Invoking: Cygwin C++ Linker
g++ -nostartfiles -L"E:\cygwin\lib\mysql\lib" -lmysqlclient -lz -shared -o"final.so" ./src/one.o ./src/two.o ./src/three.o ./src/four.o ./src/five.o
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
views:
216answers:
1
+1
A:
The error message states that the mysqlclient library cannot be found. Since you're using Cygwin the issue might be that you're using a Windows-style path -L"E:\cygwin\lib\mysql\lib". I believe the GNU C++ Linker expects a Unix-style path, such as -L"/lib/mysql/lib".
Without more specific information it's hard to say though.
Erik Edin
2010-06-29 12:42:19
@ERIK Some more details >libmysqlclient.so is present under E:\cygwin\lib\mysql\lib n somehow that is not getting linked properly.I dont think its path prb coz compilation phase excuted properly with the same path.can u plz tell how to do it
rupali
2010-06-29 12:49:45
Under Project->properties->C++ Build->settings->Cygwin c++ Linker->LibrariesAdded following Libraries (-l) mysqlclient.soLibrary search path (-L)E:\cygwin\lib\mysql\lib
rupali
2010-06-29 12:59:45
I don't think g++ tries to use the -L paths during compile phase, so you won't notice the problem there.
Erik Edin
2010-06-29 13:14:56
so any other suggestions?
rupali
2010-06-29 13:26:23
Cygwin won't pay attention to e:\\. Use /cygdrive/e/...
bmargulies
2010-06-30 00:55:38
Even after path changes ----> Building target: final.so Invoking: Cygwin C++ Linker g++ -o"final.so" ./src/one.o ./src/two.o ./src/three.o ./src/four.o ./src/five.o -nostartfiles -L/cygdrive/e/cygwin/usr/local/lib -lmysqlclient -lz -shared /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status make: * [final.so] Error 1
rupali
2010-06-30 12:58:32