divendres, abril 11
Developing c++/Qt with eclipse
Actually, it's pretty easy. First of all you need to install eclipse and eclipse-cdt:
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:

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 :)
apt-get install eclipse eclipse-cdtAfter 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 -cleanNow, 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: English, Linux, Programació
Subscriure's a Missatges [Atom]


