|Link .lib in Eclipse CDT for Windows, Cygwin G++ linker [message #809173]
||Tue, 28 February 2012 15:06
| Massimo Cristofolini
Registered: February 2012
I've just installed Eclipse (I usually develop with MS Visual Studio and 'ol Borland Builder).
I'm trying to link a library (say, myLib.lib), stored in my project path (D:\Documenti\eclipse\workspace\HelloWorld), but I get an error.
Building target: HelloWorld
Invoking: Cross G++ Linker
g++ -LD:\Documenti\eclipse\workspace\HelloWorld -o "HelloWorld" ./main.o -lmyLib
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lmyLib
collect2: ld returned 1 exit status
make: *** [HelloWorld] Error 1
I've modified project Properties->C/C++ Build->Settings->Cross G++ Linker for Debug and Release mode adding the current path to the "Library search path" (both using '/' and '\'), adding the library in the "Library" field (with/without .lib, with/without entire path, ...) but without success.
I found some discussions about this, but most is for Linux version, and following the Windows oriented posts I get no results.
Maybe a step by step guide.
Thanks in advance for your help!
[Updated on: Tue, 28 February 2012 15:07]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01714 seconds