Re: [Dev-C++] How to build static library with Dev-c++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Elizabeth B. <sog...@ya...> - 2002-08-09 16:40:45
|
"Ahmad Munif" <mu...@ho...> writes: > i'm building mysql wrapper that linking with > -lmysqlclient -lwsock32 -lzlib > wrapper running well, then i built static library > using dev-c++ that linking with > -lmysqlclient -lwsock32 -lzlib and i got > new static library mywrapper.a > > i rename that name become libmywrapper.a then copy to lib dev-c++/lib > > but, when i used that static library that linking my application to > -lmysqlclient -lwsock32 -lzlib -lmywrapper > > i'm getting many linker error message: > [linker error] undefine reference to mysql_connect > > What's wrong ? > how to build static library dan using it with dev-c++ ? The order of the libraries on the command line make a difference. Try placing -lmysqlclient *after* -lmywrapper. Elizabeth |