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.
Related
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.
I have a Linux project witch I developed in vim and now I'd like to go on developing it in Visual Studio with IntelliSense etc.
It's a Makefile project so I need to build it on the Linux machine.
I already created the project and created the connection and it works but I can't build because I am building with a prefix script so I open a new interactive shell with something like this
set -i
. "/tools/dist/xxxx-2010.0"/etc/profile
I don't think that visual studio can handle such thing.
Is there a way to do it?
I am calling my startprefix script with an alias then it starts the interactive shell and then I enter my make commands for usual but in visual studio it won't build it stops at t he very beginning after executing the first command (which is the startprefix alias)
And another thing is that I don't see any project files in my solution I unloaded and loaded the project but it won't get me the source files. Am I doing something wrong?
The Visual Studio C++ for Linux add-in supports MSBuild, makefile and CMake projects. If you already have the makefile then create a new Linux makefile project in VS, add in the source files and hit F5 to build.
Trying to read between the lines of your question:
C++ for Linux is optional and must be installed
thru the VS installer.
Everything, i.e editing, building, debugging, is run in VS from the
Windows host.
The source resides on the Windows host (although you can do things with shared drives if needed).
The Linux remote is just that, remote.
You might need to interact with the Linux remote to debug an
X-Windows based GUI application but console applications can be
debugged entirely on the Windows host.
If you have other commands that you need to run before and/or after the makefile then you can set these up in the VS project settings. Likewise and parameters you need to pass to make.
I have a project C/C++ in Visual Studio. I have some trouble:
How can i build release version which can run in Linux and MacOSX, of course it have to run in Window.
Thanks
cmake is a usefull tool to complie program write by C/C++,as well as other,recommend you to use.
for how to write a program which could run everywhere,I am considering you need to read some open source project,this is a good start.
I am using Microsoft Visual Studio 2010. When I am building my application in Debug mode, it is producing an EXE file (like it is supposed to be doing). But then (which is very surprising for me), when I change the mode from Debug to the Release mode, the compiler builds the application as a .DLL file?
I have only very recently started to use Visual Studio 2010, so don't know my way around it yet. How do I fix this so that when it is compiling in Release mode, to build the application as an .exe file ?
Set your project type to Windows Application.
In the IDE, right click on your project, and select Properties.
Configuration Properties->General->Configuration Type set to 'Application (.exe)'
In project options you should be able to choose whether you're building a .DLL or .EXE. I thought these were the same for all configurations, but you can check to see for yourself.
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.