Compile error after adding PDDocGetXAPMetadata

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. #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...
    2. #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: ...
    3. 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...
    4. 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...
    5. #24555 [Opn->Csd]: Compile error
      ID: 24555 Updated by: sniper@php.net Reported By: kv at gki dot ru -Status: Open +Status: Closed...
  3. #2

    Default Re: Compile error after adding PDDocGetXAPMetadata

    Is PI_PDMETADATA_VERSION defined?
    Bernd Alheit Guest

  4. #3

    Default 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

  5. #4

    Default Re: Compile error after adding PDDocGetXAPMetadata

    Check the working sample for code that initialises gPDMetadataHFT.

    Aandi Inston
    Aandi_Inston@adobeforums.com Guest

  6. #5

    Default 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

  7. #6

    Default 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

  8. #7

    Default Re: Compile error after adding PDDocGetXAPMetadata

    Are the symbols in your pimain.obj?
    Bernd Alheit Guest

  9. #8

    Default 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

  10. #9

    Default Re: Compile error after adding PDDocGetXAPMetadata

    Do you use PIMain.c in Headers\API of the Acrobat SDK?
    Bernd Alheit Guest

  11. #10

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139