User forums > Help
How to connect static lib.
dkaip:
I have a problem. Just build pdfium.lib library in Windows 10.
In Linux runs ok, with Other linker options.
--- Code: ----pg -s -Wl,--start-group libpdfium.a -Wl,--end-group -lpthread -ldl -lpthread
--- End code ---
But how to connect on windows???
--- Code: ----pg -s -Wl,--start-group libpdfium.lib -Wl,--end-group -lpthread -ldl -lpthread
--- End code ---
With pdfium.lib i take
||=== Build: Debug in maintest (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lpdfium.lib|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
Thank you
Jim.
Totoxa:
Is the library in the linker search path?
oBFusCATed:
-lpdfium -Lpath-to-lib?
dkaip:
Yes pdfium.lib is in main folder. No problem with path.
If i put -lpdfium i am taking ...
||=== Build: Debug in maintest (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\Users\jj\Desktop\pdfium_test\main.cpp|6|undefined reference to `FPDF_LoadDocument'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
All i have is one file, the pdfium.lib in main folder, that is a static lib, so i must put at Other linker options, have i right?
In Linux the pdfium.a runs ok, but in windows i have problem with pdfium.lib
--- Code: ---mingw32-g++.exe -Lpublic -Llibs -o bin\Debug\maintest.exe obj\Debug\main.o -pg -s -Wl,--start-group pdfium.lib -Wl,--end-group -lpthread
--- End code ---
Thank you
Jim
gd_on:
May be your problem comes with your static library file. A .lib file is generally for microsoft visual C. With mingw32, as in linux, the standard library extension is .a.
May be you should try to compile your library yourself with your compiler or find a compatible .a file.
Not sure this will solve your problem because I have already used .lib file and mingw32 with success, but it failed also in many cases, so ...
gd_on
Navigation
[0] Message Index
[#] Next page
Go to full version