I follow this link and download the built directory, tring to use qpdf library in a easy way. How to build qpdf on Windows?
I do these steps to setup my visual studio project:
1. C/C++ -> General -> Additional Include Directories : qpdf-10.3.3\include
2. Linker -> General -> Additional Library Directories : qpdf-10.3.3\bin;qpdf-10.3.3\lib
3. Linker -> General -> Additional Dependencies :
C:\SDKs\qpdf-10.6.3\bin\libgcc_s_dw2-1.dll
C:\SDKs\qpdf-10.6.3\bin\libstdc++-6.dll
C:\SDKs\qpdf-10.6.3\bin\libwinpthread-1.dll
C:\SDKs\qpdf-10.6.3\bin\qpdf28.dll
,then I try a sample code from qpdf github examples: https://github.com/qpdf/qpdf/blob/main/examples/pdf-attach-file.cc
At the end, I got an error (and a warning), which is
Error
Code Description File Line
LNK1107 invalid or corrupt file: cannot read at 0x308 C:\qpdf-10.6.3\bin\libgcc_s_dw2-1.dll 1
Warning
C26495 Variable 'QPDFObjectHandle::TokenFilter::pipeline' is uninitialized. Always initialize a member variable (type.6). qpdf_t01 C:\qpdf-10.6.3\include\qpdf\QPDFObjectHandle.hh 172
Although at this point, I found I can use bin\qpdf.exe in command line terminal.
but I suppose I can use it as a c++ library, so what did I miss here?
Thankful to any suggestion.