PDA

View Full Version : how wirte c++ program control mysql?


foolfei
04-24-2003, 08:04 AM
i use mysql3.2 belong to RedHat7.3.
my program language is c++.
there are some problem when compile.

$ gcc -o sql sql.cpp -I/usr/include/mysql -L/usr/lib/mysql -lmysql
/usr/bin/ld: cannot find -lmysql
collect2: ld returned 1 exit status

i dont know whats wrong.
help

krycek
04-24-2003, 05:26 PM
It would be helpful if you could explain exactly what you are trying to do, and how you are trying to do it.

I am guessing that you are trying to install MySQL from source. Make sure you have the latest version of GCC installed, and then it's as simple as working out your configure line, configuring, then make and make install.

RH7.3 does not have the latest GCC by default, so either upgrade to RH 8.0 or just upgrade GCC (and its buddies).

Oh yeah and some other things once that is done, but that's it for the compiling :)

::] krycek [::