PDA

View Full Version : QT project to Eclipse CDT in a few steps



safarend
23rd July 2013, 05:11
After looking all over the Internet, Google, and documentation I did not find anything that guide to how to move a QT project to Eclipse CDT, so after it worked for me I decided to make it easier for those who will need it .

Steps to move Qt project to Eclipse CDT

First you need to have Eclipse CDT installed, you can do that by typing in the terminal the following:-
[ sudo apt-get install eclipse-cdt]
After that go to open Eclipse and press File -> New Project, and choose C++ Project then Next, then type project name and choose the directory of the source code then an empty project -> Linux


http://s6.postimg.org/vkcf0qpoh/3_Choose_dir.png



Then press finish and then yes


Now you will see your project on your left click on it and choose Project from the menu ->Properties click on C/C++ Build and remove the check from Generate MakeFiles Auto and in the Build location navigate to the folder that contains MakeFile that QT created for you.

http://s6.postimg.org/lpl9uilq9/5_makefile.png

Now you can compile the code with no errors, and to run the project you need to do the following after building(compile) your project.
Click Run from the menu and choose External Tools Configurations and double click Program from the right and type any name then in Location choose the executable file that was created by the compilation.

http://s6.postimg.org/fndn40xa9/6_run.png

If you still have Unresolved reference, you need to choose Windows in the menu and click Preferences double click on C/C++ - > Indexer in the Cash limits frame increase the cache I do not know what is the right amount but you can try yourself.

http://s6.postimg.org/wdp0tcvpd/7_Index.png

I have attached the picture in case if the pictures are not visable