Wade Maxfield writes:
>
> I installed the Mysql 3.22 rpms off the tcx.se website. Mysql is up and
> running. Installed the clients and thde development rpms.
>
> I am able to compile a program without errors. As soon as I try to
> link, I get mysql_connect, mysql_*** (put what you want in ***) not
> found.
>
> I am compiling and linking with the following:
>
> gcc -g -o foo -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient main.c
>
> no errors on compile.
> on link, I get the "undefined reference" error.
>
> I tried -llibmysqlclient, -lmysqlclient.a, -llibmysqlclient.a, and more
> options. Most of the time, I get "libmysqlclient" not found in the
> compile stage.
>
> HELP! I tried -lsocket -lnsl and others.
>
> _any_ suggestions? I searched the FAQ and all the documentation, to no
> avail. Do I have to compile the rpm source to make it work????
>
> wade
Hi!
First check out whether there is libmysqlclient.a or .so in
/usr/lib/mysql.
If it is there and looks OK, then try to run the above in two stages,
first compile and then link.
Sinisa
+---------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Belgrade |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|_____ Serbia |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+---------------------------------------------------------------------+