codelite and QT
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Mar 17, 2008 10:18 pm
- Contact:
codelite and QT
How to compile and execute QT project in Codelite?
- eranif
- CodeLite Plugin
- Posts: 6373
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Mar 17, 2008 10:18 pm
- Contact:
Re: codelite and QT
Yes I am using qmake.
- eranif
- CodeLite Plugin
- Posts: 6373
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: codelite and QT
In that case:
Note: I am assuming that your qmake generate a GNU makefile
- Right click on your project and select 'Settings'
- Select the 'Custom Build' tab
- Enable the checkbox that says: 'Enable custom build'
- In the 'Build Command' type: make
- In the 'Clean Command' type: make clean
- In 'Makefile Generators' select: QMake
- The 'Command to use for makfile generation' (which is now enabled) type the command for qmake: (e.g. qmake)
- Click 'OK'
Now, when right clicking in your project, you have a new option 'Run Qmake'
- Right click on your project and select the 'Run Qmake' - codelite will now run qmake to generate the makefile (this step can be done only once)
- Build your project using F7 or right click -> build
HTH,
Eran
Note: I am assuming that your qmake generate a GNU makefile
- Right click on your project and select 'Settings'
- Select the 'Custom Build' tab
- Enable the checkbox that says: 'Enable custom build'
- In the 'Build Command' type: make
- In the 'Clean Command' type: make clean
- In 'Makefile Generators' select: QMake
- The 'Command to use for makfile generation' (which is now enabled) type the command for qmake: (e.g. qmake)
- Click 'OK'
Now, when right clicking in your project, you have a new option 'Run Qmake'
- Right click on your project and select the 'Run Qmake' - codelite will now run qmake to generate the makefile (this step can be done only once)
- Build your project using F7 or right click -> build
HTH,
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Mar 17, 2008 10:18 pm
- Contact:
Re: codelite and QT
thanks.
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: codelite and QT
Hi there eranif, sorry to bump old post, but recently I tried Qt and fall in love with it, In the past I have been wxWidgets user, but after seeing how simple Qt way is, I just couldn't help it
, anyway one of the obstacle for me (well for everybody I guess), is the qmake system, I have tested your guide from this thread, but I failed, it says:
EDIT:
Sorry, I have success building the project
, it turns out, I enter the wrong path for Qt's bin dir in the PATH environment variable
. Anyway it's allright now, but I still have question and request, the qmake is 2 step process, but the codelite only handle 1 step, typically in qmake is like this:
But codelite only allow, either just 'qmake -project' or 'qmake' only
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
I have try entering QTDIR, QMAKESPEC, and PATH to Qt in the Environment Variable setting in CodeLite, but no luck, could you help, or should I modify the global environment variable in windows ?Building:
qmake
----------Building project:[ FindDialog - ]----------
Failed to start build process, command: qmake, process terminated with exit code: 0
EDIT:
Sorry, I have success building the project
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Code: Select all
C:\Foo\>qmake -project
C:\Foo\>qmake
C:\Foo\>mingw32-make
- eranif
- CodeLite Plugin
- Posts: 6373
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: codelite and QT
There is already feature request for this:aaulia wrote:But codelite only allow, either just 'qmake -project' or 'qmake' only
http://sourceforge.net/tracker/index.ph ... tid=979963
Until this is supported, you can do this:
You can define an external tool for this (available in revision > 2060):
- From Plugins -> External Tools -> Configure External Tools...
- CLick 'New'
- Select a unique ID for the tool you want. (e.g. external_tool_0)
- Give the tool a name: 'Run qmake -project'
- Select the path to qmake
- In the working directory, set the path to the .pro file - TIP: You can use macros that will be expanded by CodeLite. Lets say that your .pro file is under the workspace directory, so you can set this:
$(WorkspacePath), click the 'Help..' button to see the list of macros available.
- in the arguments field, enter: -project
- check 'capture process output' --> this will display the output of qmake -project into the 'output' tab
- Optionally, you can set icons - if non provided, CL will set the default icons for you (grey cog)
- Click OK and close the dialogs.
Now in the toolbar, you have new gray cog, when u place the mouse over it, a tip will appear with the name provided earlier: 'Run qmake -project' - click it to perform the 'qmake -project command
HTH
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: codelite and QT
Nice !!
.
CodeLite have been amazing for me in the last month, first it's 'lite', second the refactoring rocks, third custom build system stuff, FYI there are not many IDE for windows that support this stuff, sure CB can too, but still setting up for CL is still more simple. Wow. Thanks eranif
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
CodeLite have been amazing for me in the last month, first it's 'lite', second the refactoring rocks, third custom build system stuff, FYI there are not many IDE for windows that support this stuff, sure CB can too, but still setting up for CL is still more simple. Wow. Thanks eranif
- eranif
- CodeLite Plugin
- Posts: 6373
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: codelite and QT
Thank you for the kind wordsaaulia wrote:Nice !!.
CodeLite have been amazing for me in the last month, first it's 'lite', second the refactoring rocks, third custom build system stuff, FYI there are not many IDE for windows that support this stuff, sure CB can too, but still setting up for CL is still more simple. Wow. Thanks eranif
![Smile :)](./images/smilies/icon_e_smile.gif)
Eran
Make sure you have read the HOW TO POST thread