PDA

View Full Version : issues compiling Qt4.1 with mysql



patcito
8th January 2006, 03:04
This is the output I get from configure though I do have all my libmysqlclient-dev install, I use kubuntu, anyone?

g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -I. -o mysql.o mysql.cpp
mysql.cpp:1:19: error: mysql.h: No such file or directory
make: *** [mysql.o] Error 1
MySQL (thread-unsafe) disabled.
MySQL support cannot be enabled due to functionality tests!


and "locate mysql.h" does return "/usr/include/mysql/mysql.h".

Thanx in advance

Patcito

kandalf
8th January 2006, 03:44
How did you configure it?
Can you show us your ./configure options?

patcito
8th January 2006, 03:52
./configure -v -qt-sql-mysql -qt-sql-sqlite

xor
8th January 2006, 15:30
./configure -v -qt-sql-mysql -qt-sql-sqlite
Try this:

./configure -v -qt-sql-mysql -I/usr/include/mysql -qt-sql-sqlite

kandalf
9th January 2006, 02:15
Maybe you can modify your CFLAGS env var to include /usr/include/mysql too.

mgleahy
6th March 2006, 23:39
I've got the same problem with 4.1.1 - did anyone else get around this?

When I add -I/usr/include/mysql, I get the following output:

MySQL (thread-safe) auto-detection... (-I/usr/include/mysql)
g++ -o mysql_r mysql.o -lmysqlclient_r
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [mysql_r] Error 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... (-I/usr/include/mysql)
g++ -o mysql mysql.o -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [mysql] Error 1
MySQL (thread-unsafe) disabled.
MySQL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.

(oops - the FAQ mentions to use the -L option - thanks for pointing it out below).

wysota
6th March 2006, 23:41
Look in the FAQ (http://www.qtcentre.org/forum/faq.php?faq=qt_faq_section#faq_qt_compiling_mysql_ plugin_category).