divendres, abril 11

 

Developing c++/Qt with eclipse

Actually, it's pretty easy. First of all you need to install eclipse and eclipse-cdt:
apt-get install eclipse eclipse-cdt
After that, you have to download qt eclipse integration plug-in from http://trolltech.com/developer/downloads/qt/eclipse-integration-download

Installation instructions are here: http://trolltech.com/developer/downloads/qt/qteclipse-installmanual
Basically you have just to copy the files where you have your eclipse plugins folder. It usually is
/usr/local/eclipse/ or usr/lib/eclipse

If you have no root permissions but you already have eclipse installed on your system, you can install eclipse-cdt and qt integration in your home directory. Just install cdt tools from Help->Software updates->"Find and install" "Search for new updates" Select "Callisto Discovery Site" and C/C++ in the list it'll be shown. If you have no permissions it'll ask you where to install the plugins, just select your home directory. It'll make a dir called "eclipse" where you specify. You'll have to install qt integration in that folder.

then start eclipse with:
eclipse -clean
Now, go to window->preferences Qt and click "Add..." and configure qt settings:


To import an existing project go to File->import Qt->Qt Project and select you .pro.
I also needed to modify some settings
My main executable is inside a directory called app and has some relative addresses so, i needed to specify my working
directory in Run->Debug... Arguments "Working directory:" to ${workspace_loc:main}/app I also had a widget under the folder widget which was used by my main application so i had to specify the path under Debugger "Debugger Options" "Shared Libraries" Add.. ~/FIB/VIG/Myapp/widget in my case. If the debugger tells you something like "No source file named xxx.cpp" try adding the path to Run->Debug... Source

That's all, happy coding :)

Etiquetes de comentaris: , ,


Comentaris:
oita un briox sapiondo! ^^





deixo la meua petjada ^^
(i comento en l'unic post que no m'he llegit XD)
 
Hei! fantastic aixo!
 
Publica un comentari





<< Pàgina principal

Subscriure's a Missatges [Atom]