User forums > Help
[Solved *Really] CodeBlock can't find QT4 libs
scarphin:
Well on Win I don't remember bugging the settings that much, must be specific to linux.
huhmaster:
What is the final solution guys ? ??? ???
Here is what I did but I am still getting the same error as " fatal error: QtCore/QByteArray: No such file or directory| "
Similar errors for all other include files.
1. In the Code::Blocks Settings -> Globalvariables
base "/usr"
include "/usr/share/qt4/include"
lib "/usr/lib"
obj "/usr/bin"
2. Settings -> Compiler Debugger Settings -> Global Compiler Settings -> [Search Dir] Tab -> [Compiler] subTab
and added all 18 directories in /usr/share/qt4/include/
That didn't work so I tried the 18 directories in /usr/include/qt4/
Stilll nothing is working.
Need a solution urgently guys. ??? :'(
Radek:
I have given up a combination Code Blocks + Qt4 long ago but I have a recommendation:
(1) Add only one #include path, namely /usr/share/qt4/include.
(2) Include headers along with their subdirs. Supposing QApplication is in QtCore (I don't know), #include <QtCore/QApplication> and not #include <QApplication>. Well, you need to know exactly where your headers are but they won't be in too many subdirs. This should solve the problem with Qt4 headers.
(3) If you can compile only as a root then check access rights of the directories of the headers, the headers themselves and Qt4 libraries for access rights. You need rwxr-xr-x everywhere. If it is not the case, update access rights (as a root). You will do it only once.
(4) More problems ahead: MOC compiler, etc. Good luck ;D
You can also create a script, say qt4-config, which will push the needed include paths and libpaths on the command line. Then you add `qt4-config` to the compiler and linker options. It's a similar practice as the one used by wxWidgets (wx-config).
ars:
I have defined the global variable at win xp, CB 10.05, qt 4.8, includeed include folders in compiler options of CB,. But I father receive "Qdir not found" about header file--what to do to resolve this issue?
Navigation
[0] Message Index
[*] Previous page
Go to full version