List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:March 24 2001 3:12pm
Subject:RE: MySQL++ development compiling errors
View as plain text  

>>>>> "Mike" == Mike Cardosa <mike@stripped> writes:

>> Hi!
>> You have forgotten to link in MySQL++ library.

Mike> Hi there!

Mike> It appears that from the installation, all of the include files are in
Mike> /usr/include. Where else do I have to link? Take a look at the command line
Mike> I used:

Mike> bash$ g++ test2.cpp -o test.cgi -I/usr/include/mysql -I/usr/include

Mike> The only reason that I linked /usr/include/mysql was that the mysql.h file
Mike> was in there; if I didn't link there, it would give me an error message
Mike> saying that mysql.h couldn't be found. Plus, the -I/usr/include had no
Mike> effect on the error output. It's already a directory that is searched by the
Mike> compiler.

Mike> So where else should I include?

You have not told the compiler which libraries to use.

You have to at least add:

-lsqlplus -lmysqlclient -lz

to the link line

MySQL++ development compiling errorsMike Cardosa23 Mar
  • Re: MySQL++ development compiling errorsSinisa Milivojevic23 Mar
    • RE: MySQL++ development compiling errorsMike Cardosa23 Mar
      • RE: MySQL++ development compiling errorsSinisa Milivojevic24 Mar
      • RE: MySQL++ development compiling errorsMichael Widenius24 Mar