Steven Wexler
Steven Wexler

Reputation: 17299

Netbeans errors on files that compile

I am new to qt, qmake, etc.

I've created a .pri file that includes:

INCLUDEPATH += $$QXMPP_INCLUDE_DIR \
               /path/to/mysql-connector-c++-1.0.5/

LIBS += $$QXMPP_LIBS \
        -lmysqlcppconn

When I

qmake -o Makefile make ./myProject

or simply hit run in the Netbeans IDE my project compiles and runs successfully.

However, my Netbeans IDE does not realize I have included the mysqlcppconn library I think because I have errors in my code as shown in the pictures below. How can I get rid of these errors? My suspicion is that I should I tell Netbeans that I've included the mysqlcppconn library. If that is correct how can I do that? Or is there something else I should do?

Thanks!

error

error

Upvotes: 0

Views: 247

Answers (2)

Dimse
Dimse

Reputation: 1506

While i must admit I have no direct answer to your problem, I do have a number of surgestions:

  1. The project file is supposed to be named .pro (though I guess that was just a typo in the post)
  2. While there should be no problem in using Netbeans I will provide you with the personal recommendation of using Qt Creator as your IDE. In my own opinion it is a great IDE, and it is designed with Qt in mind.
  3. For SQL i would recommend you take a look at QSqlDatabase

Upvotes: 1

Vivek Goel
Vivek Goel

Reputation: 24160

you have to define include directory in netbeans project properties. right click on project and go to properties there define include directory in c++ option.

Upvotes: 1

Related Questions