Open GoogleCodeExporter opened 9 years ago
You need to define FPDFSDK_EXPORTS in both the pdfium project and the dependent
projects for the symbols to be exported and imported correctly.
That said, I think you'll run into issues using pdfium as a dll; i'm not sure
is ready for that yet (and I'm not sure it's headed in that direction either)
Original comment by lultimou...@gmail.com
on 3 Mar 2015 at 10:00
I tried static library, I h ave FPDFSDK_EXPORTS in pdfium project and every
dependent project (pdfium_test and fpdf*, fx*, etc projects).
But still can't compile win32 pdfium_test binary (using only pdfium.lib).
I tried x64 static library, pdfium_test + pdfium.lib creates pdfium_test.exe
which is working.
There is something wrong with Win32 version, but I do not know what and why, I
do not understand gyp very well, neither the whole code of pdfium
Original comment by martin.m...@gmail.com
on 3 Mar 2015 at 12:29
Finally, I fixed this with the following patch:
Win32 configuration requires __stdcall, when it is included in project (not
exported), but this is not required in x64 configuration
--- a/fpdfsdk/include/fpdfview.h
+++ b/fpdfsdk/include/fpdfview.h
@@ -112,7 +112,12 @@ typedef const FS_RECTF* FS_LPCRECTF;
#define STDCALL __stdcall
#else
#define DLLEXPORT
+#if !defined(_WIN64)
+// On Windows Win32 (not x64) requires __stdcall convention
+#define STDCALL __stdcall
+#else
#define STDCALL
+#endif // !defined(_WIN64)
#endif
extern const char g_ExpireDate[];
Original comment by martin.m...@gmail.com
on 7 Mar 2015 at 1:03
Still a problem without the patch? Again, we just use ninja. For MSVS, I'm not
sure this is expected to work if you modify the GYP generated project in MSVS.
thakis@ might know...
Original comment by thestig@chromium.org
on 8 Aug 2015 at 1:14
Original issue reported on code.google.com by
martin.m...@gmail.com
on 3 Mar 2015 at 1:56