Hi,
I just came over to FreeBSD from CentOS, so I'm still catching up with the basics. I'm having trouble with compiling using gcc in regards to mysql. I have compiled this same source file on CentOS with gcc with the following command:
now I'm using it without 'sudo' (by just becoming root using 'su')
and inside the file I have:
I'm getting a error:
on doing "find /usr -iname 'mysql' , I get:
I have both mariadb103-server and client installed. I suppose I don't need connector C? I have also tried:
Thank you for your help in advance.
I just came over to FreeBSD from CentOS, so I'm still catching up with the basics. I'm having trouble with compiling using gcc in regards to mysql. I have compiled this same source file on CentOS with gcc with the following command:
Code:
"sudo gcc -std=gnu11 -Wall -lm -o /path/compiled.cgi /path/source.c -lmysqlclient "
and inside the file I have:
Code:
#include <mysql/mysql.h>
I'm getting a error:
Code:
/usr/local/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
on doing "find /usr -iname 'mysql' , I get:
Code:
/usr/local/share/mysql
/usr/local/include/mysql
/usr/local/include/mysql/server/mysql
/usr/local/include/mysql/mysql
/usr/local/lib/mysql
/usr/local/bin/mysql
I have both mariadb103-server and client installed. I suppose I don't need connector C? I have also tried:
Code:
-I/usr/local/mysql/include
-L/usr/local/mysql/lib -lmysqlclient
Thank you for your help in advance.