Reputation: 20766
I need to include header files from sqlite3x library (or from sqlite) in my project. I've just created new project in Qt Creator and added the following lines in .pro-file:
INCLUDEPATH += $$quote(D:/libs/libsqlite3x-2007.10.18) INCLUDEPATH += $$quote(D:/libs/sqlite-amalgamation-3071502)
Then i've tried to include
#include <sqlite3x.hpp>
and compile.
Cannot open include file: 'sqlite3.h': No such file or directory
Why?
If i write
#include <sqlite3.h>
i've got the same error.
When i write this preprocessing directive, Qt Creator gives me an autocompletion and if i press F2 on this line it'll open this file.
http://pastie.org/7670341 http://pastie.org/7670574
Upvotes: 0
Views: 1501
Reputation: 14049
You need
INCLUDEPATH += $$quote(D:/libs/libsqlite3x-2007.10.18) $$quote(D:/libs/sqlite-amalgamation-3071502)
If you see http://pastie.org/7670574 these are the include directives
-I"D:\libs\libsqlite3x-2007.10.18" -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"release" -I"." -I"." -I"D:\libs\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010"
If you look - you don't see D:/libs/sqlite-amalgamation-3071502
. Your build tool is not picking up the directory & adding it to the INCLUDEPATH
because only it picks up only one INCLUDEPATH
line - so both to the same INCLUDEPATH
line with a space separating them.
Upvotes: 0