Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Andreas_Schauerte@adobeforums.com #1
Compile error after adding PDDocGetXAPMetadata
Hi all,
I build a plug-in for the Windows version of Acrobat Professional 7.0 using Visual Studio .NET 2003 and the Acrobat Plug-In Wizard (Acro7PIWiz) from Acrobat SDK 7.0.5.
Everything works fine, but when I want to access XMP-Data by including a call to PDDocGetXAPMetadata I get the following compile time errors:
plugininit.obj : error LNK2001: unresolved external symbol _gPDMetadataHFT
plugininit.obj : error LNK2001: unresolved external symbol _gPDMetadataVersion
As you can see, I put the statement in the plugininit.cpp file (menu button event).
The pimain.c file contains following definition:
#if PI_PDMETADATA_VERSION != 0
HFT gPDMetadataHFT = 0;
ASUns32 gPDMetadataVersion = 0;
#endif
What am I missing here? Any hints would be appreciated.
Source code will be handed out, if anybody find this usefull
Thanks a lot in advance
Andreas
Andreas_Schauerte@adobeforums.com Guest
-
#40538 [NEW]: Compile Error
From: support at myevolve dot com Operating system: Red Hat EL 3 PHP version: 5CVS-2007-02-19 (snap) PHP Bug Type: mbstring... -
#26284 [Opn->Bgs]: Compile error
ID: 26284 Updated by: sniper@php.net Reported By: j dot j dot d dot e dot lammerts at vanlanschot dot com -Status: ... -
PHP 4.3.3 compile error w/GD
Anyone else have this problem compiling PHP 4.3.3 from source under Linux (I'm using Slackware 9.0)? Under PHP 4.3.2 I had no compilation... -
Error during compile of 5.8.1-RC2
I tried to send this as an email to perlbug@perl.org, but it kept bouncing. This is a compile-time error, so I can't use perlbug to report it. My... -
#24555 [Opn->Csd]: Compile error
ID: 24555 Updated by: sniper@php.net Reported By: kv at gki dot ru -Status: Open +Status: Closed... -
Bernd Alheit #2
Re: Compile error after adding PDDocGetXAPMetadata
Is PI_PDMETADATA_VERSION defined?
Bernd Alheit Guest
-
Andreas_Schauerte@adobeforums.com #3
Re: Compile error after adding PDDocGetXAPMetadata
Hi,
PI_PDMETADATA_VERSION is defined in pirequir.h as PDMetadataHFT_VERSION_6.
After adding the following to plugininit.cpp, compiling succeeds:
extern "C" HFT gPDMetadataHFT;
extern "C" ASUns32 gPDMetadataVersion;
But a call to PDDocGetXAPMetadata never returns.
gPDMetadataHFT has value of 0
gPDMetadataVersion has value of 458752 (0x00070000 witch is defined by PDMetadataHFT_VERSION_7)
Are there any other dependencies? Snippet DocMetadataSnip can access Metadata (using the same method) without any problems.
Thanks
Andreas
Andreas_Schauerte@adobeforums.com Guest
-
Aandi_Inston@adobeforums.com #4
Re: Compile error after adding PDDocGetXAPMetadata
Check the working sample for code that initialises gPDMetadataHFT.
Aandi Inston
Aandi_Inston@adobeforums.com Guest
-
Bernd Alheit #5
Re: Compile error after adding PDDocGetXAPMetadata
PI_PDMETADATA_VERSION is defined in pirequir.h as PDMetadataHFT_VERSION_6.
Only when PDMETADATA_HFT is defined and READER_PLUGIN isn't defined.
Bernd Alheit Guest
-
Andreas_Schauerte@adobeforums.com #6
Re: Compile error after adding PDDocGetXAPMetadata
My prior post was wrong, sorry for that - adding the extern declaration doesn't work, I'd added some duplicated code... and then the values were of course wrong.
Bernd: you are right.
piheaders.h: #define PDMETADATA_HFT 1
READER_PLUGIN is not defined.
How do I correctly resolve the "unresolved external symbol _gPDMetadataHFT / _gPDMetadataVersion" problem?
Thanks for your patience.
Andreas
Andreas_Schauerte@adobeforums.com Guest
-
Bernd Alheit #7
Re: Compile error after adding PDDocGetXAPMetadata
Are the symbols in your pimain.obj?
Bernd Alheit Guest
-
Andreas_Schauerte@adobeforums.com #8
Re: Compile error after adding PDDocGetXAPMetadata
Good guess.
Symbols are not included in pimain.obj, because PDMETADATA_HFT is not defined. As mentioned, it is defined in PIHeaders.h, but this is not used, when compiling pimain.c - don't know why.
Got my code to work by adding #define PDMETADATA_HFT 1 to pimain.c manually. I'm not sure, if this is the "preferred" way of working around this problem. After trying to compare my project with the working SnippetRunner I don't know what else to do.
Any suggestions?
Andreas
Andreas_Schauerte@adobeforums.com Guest
-
Bernd Alheit #9
Re: Compile error after adding PDDocGetXAPMetadata
Do you use PIMain.c in Headers\API of the Acrobat SDK?
Bernd Alheit Guest
-
Andreas_Schauerte@adobeforums.com #10
Re: Compile error after adding PDDocGetXAPMetadata
No, the PlugIn-Wizard has generated a pimain.c file in the project directory - I've tried the Headers\API-Version without success and switched back to the original (lightly different) copy in my project directory.
Andreas_Schauerte@adobeforums.com Guest



Reply With Quote

