唉,还是不行,看样子 mysql 装得有问题。按照 configure 里面的测试程序写了一段:
testmysql.c:
#include "mysql.h"
#define NULL ((void*)0)
int main ()
{
mysql_real_connect(
NULL,
"127.0.0.1",
"root",
"",
"bbs",
3306,
NULL,
0);
return 0;
}
然后编译:
# gcc -lmysqlclient -L/usr/local/mysql/lib -I/usr/local/mysql/include -o
testmysql testmysql.c
然后出错:
/var/tmp//ccltqyjb.o(.text+0x3c): In function `main':
: undefined reference to `mysql_real_connect'
怎么回事啊。。。~~~~~~~~~~~>.<~~~~~~~~~~
【 在 fancitron (Albatross) 的大作中提到: 】
: 或许跟 linux 还是 freebsd 有关?
: 我也怀疑 ./configure 这个脚本本身可能有问题。
: 以前在纯正的 redhat linux 上用 intel c compiler (ICC) 企图编译 smthbbs-1.2.2
: ...................
--
修改:fancitron FROM 59.66.199.*
FROM 59.66.199.*