The 64-bit dynamic library compiled incorrectly

104 views
Skip to first unread message

Haye Lee

unread,
Feb 18, 2024, 3:11:06 AMFeb 18
to pdfium
Hello, I have encountered a problem in the compilation of pdfium. There is no problem in compiling 32-bit dynamic libraries, but if compiling 64-bit dynamic libraries, the following error will be displayed. Please tell me how to solve this problem, thank you
E:\pdfium6268\pdfium6268\pdfium>ninja -C out/x64 pdfium
ninja: Entering directory `out/x64'
[1362/1362] LINK(DLL) pdfium.dll pdfium.dll.lib pdfium.dll.pdb
FAILED: pdfium.dll pdfium.dll.lib pdfium.dll.pdb
..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe "/OUT:./pdfium.dll" /nologo -libpath:..\..\third_party\llvm-build\Release+Asserts\lib\clang\18\lib\windows "-libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "-libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64" "-libpath:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" /MACHINE:X64  "/IMPLIB:./pdfium.dll.lib" /DLL "/PDB:./pdfium.dll.pdb" "@./pdfium.dll.rsp"
lld-link: error: undefined symbol: __declspec(dllimport) GetDC
>>> referenced by .\..\..\core\fpdfdoc\cpdf_interactiveform.cpp:76
>>>               obj/core/fpdfdoc/fpdfdoc/cpdf_interactiveform.obj:(bool __cdecl `anonymous namespace'::RetrieveSpecificFont(enum FX_Charset, char const *, struct tagLOGFONTA &))

lld-link: error: undefined symbol: __declspec(dllimport) ReleaseDC
>>> referenced by .\..\..\core\fpdfdoc\cpdf_interactiveform.cpp:79
>>>               obj/core/fpdfdoc/fpdfdoc/cpdf_interactiveform.obj:(bool __cdecl `anonymous namespace'::RetrieveSpecificFont(enum FX_Charset, char const *, struct tagLOGFONTA &))

lld-link: error: undefined symbol: __declspec(dllimport) FillRect
>>> referenced by .\..\..\core\fxge\win32\cgdi_device_driver.cpp:704
>>>               obj/core/fxge/fxge/cgdi_device_driver.obj:(protected: virtual bool __cdecl CGdiDeviceDriver::FillRectWithBlend(struct FX_RECT const &, unsigned int, enum BlendMode))
ninja: build stopped: subcommand failed.

Lei Zhang

unread,
Feb 21, 2024, 3:05:20 PMFeb 21
to Haye Lee, pdfium
Please provide the GN args used in your build. It may be helpful to
also list the 32-bit build args for comparison.
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/07b013dd-ee04-4a92-9020-09f2fa3d9ffen%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages