But I chose a empty projet because when i select QT4 project it say that c:b can't find Qt4core Lib whereas QT4 is successfuly installed.
QT4 Wizard doesn't work fine in Linux. You should configure QT4 Wizard for your system.
Edit files /usr/share/codeblocks/templates/qt.cbp and /usr/share/codeblocks/templates/wizard/qt4/wizard.script
You should set correct filenames for .a libraries and correct path to QT4 directory.
For example, I've used the next patch for my system (ALT Linux Sisyphus):
--- codeblocks-1.0/src/plugins/scriptedwizard/resources/qt4/wizard.script.orig 2006-08-28 14:49:50 +0400
+++ codeblocks-1.0/src/plugins/scriptedwizard/resources/qt4/wizard.script 2006-08-28 14:51:41 +0400
@@ -5,10 +5,10 @@
////////////////////////////////////////////////////////////////////////////////
// globals
-QtPathDefault <- _T("$(#qt)");
-QtPathDefaultInc <- _T("$(#qt.include)");
-QtPathDefaultLib <- _T("$(#qt.lib)");
-QtPath <- _T("");
+QtPathDefault <- _T("/usr/lib/qt4");
+QtPathDefaultInc <- _T("/usr/lib/qt4/include");
+QtPathDefaultLib <- _T("/usr/lib/qt4/lib");
+QtPath <- _T("/usr/lib/qt4");
function BeginWizard()
{
@@ -52,7 +52,7 @@
local dir_nomacro_lib = GetCompilerLibDir(dir, QtPathDefault, QtPathDefaultLib);
if (dir_nomacro_lib.IsEmpty())
return false;
- if (!VerifyLibFile(dir_nomacro_lib, _T("QtCore4"), _T("Qt's"))) return false;
+ if (!VerifyLibFile(dir_nomacro_lib, _T("QtCore"), _T("Qt's"))) return false;
QtPath = dir; // Remember the original selection.
@@ -93,8 +93,8 @@
project.AddLibDir(QtPathDefaultLib);
// add link libraries
- project.AddLinkLib(_T("QtCore4"));
- project.AddLinkLib(_T("QtGui4"));
+ project.AddLinkLib(_T("QtCore"));
+ project.AddLinkLib(_T("QtGui"));
// enable compiler warnings (project-wide)
WarningsOn(project, Wizard.GetCompilerID());
--- codeblocks-1.0/src/templates/common/qt.cbp.orig 2006-08-28 11:46:22 +0400
+++ codeblocks-1.0/src/templates/common/qt.cbp 2006-08-28 14:23:10 +0400
@@ -32,17 +32,13 @@
<Add option=""/>
</Compiler>
<Linker>
- <Add library="libQt3Support4.a"/>
- <Add library="libQtAssistantClient.a"/>
- <Add library="libQtCore4.a"/>
- <Add library="libQtDesigner4.a"/>
- <Add library="libQtDesignerComponents4.a"/>
- <Add library="libQtGui4.a"/>
- <Add library="libqtmain.a"/>
- <Add library="libQtNetwork4.a"/>
- <Add library="libQtOpenGl4.a"/>
- <Add library="libQtSql4.a"/>
- <Add library="libQtXml4.a"/>
+ <Add library="libQt3Support.a"/>
+ <Add library="libQtCore.a"/>
+ <Add library="libQtGui.a"/>
+ <Add library="libQtNetwork.a"/>
+ <Add library="libQtOpenGl.a"/>
+ <Add library="libQtSql.a"/>
+ <Add library="libQtXml.a"/>
<Add directory="$QTDIR/lib"/>
<Add option=""/>
</Linker>
This (and a few other things) I don't like. The above will work if you define qt as global variable. But with your patch applied it's of very limited functionality. But this won't work on any other system where e.g. the libs are not under /usr/lib/qt4 (and there are many of those) and for sure not on Windows. That's why you define it as global variable - a user can then choose where the libs are on it's particular system independent of the OS.
Yes, of course! But this patch was made only for my favorite Linux distribution. And now you may find the rpm with this patch in the ALT Linux sisyphus (http://www.sisyphus.ru) repository. I don't plan to use it at the other systems. So, it is more easy to set absolute path to QT4 dir, than defining system-wide variable.
In addition: Did you notice that this is a qt4 wizard? Correct me, if I'm wrong, but isn't there the lib name with a "4"?
In my distribution there are no suffixes "4" in QT4 library names:
$ ls /usr/lib/qt4/lib/*.a
/usr/lib/qt4/lib/libQt3Support.a /usr/lib/qt4/lib/libQtNetwork.a /usr/lib/qt4/lib/libQtSvg.a
/usr/lib/qt4/lib/libQtCore.a /usr/lib/qt4/lib/libQtOpenGL.a /usr/lib/qt4/lib/libQtXml.a
/usr/lib/qt4/lib/libQtGui.a /usr/lib/qt4/lib/libQtSql.a