CMake project generator for Eclipse cdt on Linux? - c++

I have been looking for a good IDE for c++, and Eclipse CDT seems to be a good candidate. I develop(ed) my projects in CMake, which means I need to be able to generate an Eclipse project with CMake in order to use Eclipse. CMake has an configuration option for Eclipse, but it's old and incomplete.(My version 4.9 isn't supported anymore)
So I am wondering if there is another way to generate a Eclipse project using CMake, that is compatible with newer Eclipse versions. Does anyone know of one?
The Eclipse project generator HAS to be separate, it can't be integrated into Eclipse itself, as I need the project source files to be in a different location than the build files.(For GIT)
Thanks!

I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.
You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).
And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").
In this way, you will be able to use the Eclipse CDT IDE with your project.

Related

Which new project do I select in Eclipse C-C++ CDT?

I am just starting to use Eclipse IDE, I have installed the IDE, Eclipse CDT and then MinGW x64. Which new project do I select: there is no simple C++ project, all I see:
Arduino (WHY?)
Managed (don't need those)
cmake
I don't know what cmake is? And why is there a caution 'Experimental' on makefile project?
WHICH TO CHOOSE?

How do I compile a Codeblocks project made from CMake?

I am using CMake as my build system and I told it to generate Codeblocks MakeFiles. It did that successfully. Now I have a Codeblocks project that I've opened up and I don't know where to start creating an actual program to compile. What do I need to do next?
Once you have opened the project in CodeBlocks, it's CTRL-F9 to build (or menu "Build"->"Build"). This is for release 12.11, could have changed in more recent version.

Debugger with GUI for C++ on Linux

Currently I am doing C++ Development on Windows and Mac using Visual Studio and XCode respectively and planning to start on Linux too.
I know just a little about Linux, gcc/g++, gdb, Makefile.
Can one who works on large GUI development, how they debug it, as using gdb command-line tool for debugging will be difficult, as I have been in comfort of visual studio / xcode(front-end) debugger?
I see only Makefile for project on linux, is eclipse ide make project on basis of makefile?
Thanks
Eclipse will do all of that stuff for you, including creating your makefile. Before you compile for the first time, just press ctrl+B and it will build your project for you.
All of your library linking can be done by clicking on the "project" menu, then under C/C++build, click "settings". There should be a setting on there somewhere that says "libraries", which is listed under GCC/C++ linker.
It's simple to work on project with existing makefile in Eclipse.
Just go to File -> Import -> C/C++ -> Existing code as Makefile project.
This will let you build your project from IDE. To debug it just go to Run -> Debug. If default launch generated this way is not ok for you, you can customized Launch configuration in Run -> Debug configurations.
There are several IDE for linux as
CodeBlocks
Codelite
which may also use custom makefile.

How to prevent Eclipse creates nmake file instead of make?

In order to develop qt application on eclipse, i have installed mingw, qt and qt eclipse integration. When i try to build the project, it search nmake for building project and syntax of my make file is nmake syntax.
And i thought there were some special eclipse settings but i could'nt find anything about it.
How can i make eclipse produce make file instead of nmake
Any help will be appreciated.
It is because of Qt version. Nmake is special for Visual Studio integrated Qt. So If your eclipse create nmake file instead of make file. Your eclipse show wrong version of Qt.
If you don't want to get this error. You should firstly check:
Check you download true eclipse version. The Qt version which
eclipse is using is correct
Check QT_DIR in your enviroment variable show correct path.

Eclipse as an cross platform IDE for C++ code on Linux and Windows

I consider an option to use Eclipse as an cross platform IDE for C++ code on Linux and Windows.
Is it possible to set Eclipse to compile code with Visual Studio C++
(don't think it's relevant but Eclipse project files will be created by cmake).
Is it possible to debug from Eclipse application compiled by VS C++ compiler?
Is it possible to debug on Linux from Eclipse application compiled by g++?
What C++ IDE you prefer for Linux - Eclipse, Kdevelop or there're other alternatives?
Thanks
Dima
No as far as I know. The alternative would be wascana project. Now that the new version of MinGw has been released and it uses gcc.4.4 I think that wascana will be able to compete against Visual Studio, but we still have to wait to the next release of wascana.
No as far as I know. Again wascana could be an alternative.
Sure, try cmake -DCMAKE_BUILD_TYPE=Debug -G"Eclipse CDT4 - Unix Makefiles", build your project and create a debug configuration with eclipse. I've done it before with no problems at all.
I move from Emacs to Eclipse. I remember I evaluated Kdevelop but I discarded it for reasons unconnected to Kdevelop's quality itself. So I cannot give you my opinion. Another C++ crossplatform IDE is Code::Blocks, but I have never used it.
I do some C++ with Qt cross-platform development in Linux, Windows and Mac and I found Eclipse to be too heavy an environment to work with. As an IDE I preferred Qt Creator.