New Forum | Previous | Next | (P-PDF) Developers
Topic: Help on resolving HFT references using PDFEdit
Conf: (P-PDF) Developers, Msg: 53608
Date: 5/29/2002 05:00 PM
FYI - I caused a problem in my code and resolved it.
I thought I should share in case someone else runs into the same problem.
In trying to incorporate some of the PDFEdit example code into my plug-in. I noticed that to access some of the functions, I included the following in my C code:
#define PI_PAGE_PDE_CONTENT_VERSION 0x00040000
#define PI_PDFEDIT_WRITE_VERSION 0x00040000
#define PI_PDFEDIT_READ_VERSION 0x00040000
Doing so, forces several global extern HFT variables to get defined, which the linker flagged as unresolved:
chbPDFEdit.obj : error LNK2001: unresolved external symbol _gPDFEditReadHFT
chbPDFEdit.obj : error LNK2001: unresolved external symbol _gPDFEditWriteHFT
chbPDFEdit.obj : error LNK2001: unresolved external symbol _gPagePDEContentHFT
The supplied PIMAIN.C contains #ifdef statements to define these globals. To resolve the issue:
Do NOT include the #defines as listed above in your C module, but instead set them in the Preprocessor Definitions
(Project-Settings-C/C++ tab-General for MS VC++ 6 users) as :
This will cause the definitions to get recognized when both your module and PIMAIN.C are compiled.
Hope this helps someone.