0

I'm sorry, I don't speak english very well. So I have a big problem with QtCreator and Mysql. I wanted to use mysql++ with QTCreator, but it returned me:

error: undefined reference to `mysqlpp::Connection::connect(char const*, char const*, char const*, char const*, unsigned int)'

So after some researches, I did which is explained in this website, but I have neither mysql folder in /plugins/sqldrivers nor mysql.pro. I don't understand the step 3 :

3.After this, just need to compile the QT code using the “QMYSQL” driver.

My OS is Debian Wheezy

Could you help me please?

Thank you

Edit1:
I found out this thread:
Why simple mysql++ code compiles standalone, but not in project?
wich explain how to solve this problem. I've to pass in command line when I'm compiling the parameters:

-lmysqlclient -lmysqlpp

It perfectly works.
But how could I "pass" this parameters into QtCreator?

Thank you.

Community
  • 1
  • 1
moth
  • 315
  • 1
  • 13
  • Install MySQL. Then you can find the library (.so or .dll) within the MySQL directories. http://stackoverflow.com/questions/17298849/installing-qmysql-driver/17307309#17307309 – Huy Apr 02 '14 at 18:43
  • MySQL is already installed. – moth Apr 02 '14 at 18:44
  • You looked under $QTDIR/.../src/qtbase/src/plugins/sqldrivers ? why not just run a "find . -name \*sql\*" within your qt installation? – Huy Apr 02 '14 at 18:50
  • I solved the problem under terminal as I wrote it with my Answer's Edit, but not with QtCreator. – moth Apr 02 '14 at 19:30
  • In this thread there is the answer to my latest question: http://stackoverflow.com/questions/8727340/how-to-add-an-external-a-library-in-qt-creator-project-via-gui – moth Apr 03 '14 at 07:49

0 Answers0