On 10/04/07, Joe Hudson <joe.hudson@stripped> wrote:
> I'm trying to use mysql++ and run the example programs.
> I'm running OS X 10.4 using Eclipse 3.2. the link error I get is :
> /usr/bin/ld: can't locate file for: -llibmysqlpp.dylib
> (or if I change the order of the libbraries to link:
> /usr/bin/ld: can't locate file for: -llibmysqlclient.dylib )
> The call to g++ looks like:
> g++ -L/usr/local/lib -L/usr/local/mysql-standard-5.0.37/lib/mysql -o
> "Wendy" ./dbaccess/dbaccess.o -llibmysqlclient.dylib -llibmysqlpp.dylib
> The libraries do exist in /usr/local/mysql-standard-5.0.37/lib/mysql
> and /usr/local/lib
> so I don't know what the problem is and would really love some help with
> this if possible! any clues?
You should say -lmysqlclient instead of -lmysqlclient.dylib
The linker will look for libraries with the right name, and any
suitable extension (such as .a or .so or .dylib). With your link
line, the linker is looking for a file called libmysqlclient.dylib.a
or libmysqlclient.dylib.dylib and so failing to find it.
|• linking mysql++||Joe Hudson||10 Apr|
| • Re: linking mysql++||Jonathan Wakely||10 Apr|