Is satisfactory Eclipse CDT debugging on Windows possible? - c++

I am playing with Eclipse CDT for cross-platform development of a C++ project that has traditionally been developed in Visual Studio (currently 2008). On Linux, CDT is awesome: code navigation, debugging, etc. are almost as good as they are for Java. I was very excited to try it on Windows and hopefully have an alternative to Visual Studio.
But alas, the CDT debugger just doesn't seem to work right in Windows. I'm building with CMake + MinGW, and debugging with the "MinGW gdb" debugger in Eclipse. Sometimes it stops executing and I have to type gdb commands into the console to get it to continue; frequently it skips breakpoints altogether... (Note that MinGW's gdb seems to work 100% fine from the console, exactly as I would expect).
I am not looking for someone to solve these problems for me, but rather to tell me whether it is worth pursuing. Has someone gotten satisfactory results debugging C++ code in Eclipse CDT on Windows?

In the last year, I've switched to Code:Blocks. It allows you to create separate configurations for each platform. Supports all the typical things you'd expect from an IDE. It also integrates with MinGW. It's available on Windows, Mac (not well supported), and Linux.

Related

Change Mac Eclipse to Window Settings

from my computer class last year, I have a bunch of c++ programs. I made these programs in Microsoft visual c++ 2010. That program I used it only available on Windows so I needed another program for I can still code. I now have a Mac and I want to still be able to code, so I downloaded Eclipse. My question is, how do I change the Eclipse setting to be the same as the windows? For example, when I copy my coding, it finds (using namespace std) and (#include ) as an error. Thank you!
Which version of eclipse did you install? Unless you installed the versions of eclipse with C/C++ plugins, it's just a Java IDE.
But uh Eclipse kind of sucks anyways so I'd recommend trying Clion.

Eclipse for C++ Windows 7 64-bit PC

I am using 64-bit Windows 7 PC and I want to develop C/C++ programs using Eclipse IDE.
I have tried DOSBox but it was not working for me. Also, I din't liked it as well.
I just want to use Eclipse for the same. I tried using CDT Plugin in Eclipse but that doesn't worked.
When I create a new C++ project, there are different Tool Chains available - Cross GCC, Microsoft Visual C++, MinGW GCC. I really don't know what exactly it is. I tried all but I am getting error and snapshot attached :-
Basically, it is not able to detect what iostream, stdio, cout is.
I tried different solutions available on other posts but none worked for me.
I don't know what to do with it. I know I am having problem due to 64-bit Windows but I want to fix this now. Please help!
You need to install MinGW, and then select the MinGW toolchain when selecting a new project.
Well I tried different tool chains on Eclipse IDE, but nothing worked.
Then I installed CodeBlocks IDE and plugins for the same as well.
Sic: Now, I am running C/C++ codes on Code Blocks perfectly.
You need to download MinGW and install the C++ compiler, don't forget to add the MinGW bin to the system variables under "path".
I recommend you using Visual Studio Code. If you do install Visual Studio Code, make sure to install Code Runner plugin to make running C++ projects easier.

How to organize Windows and Android builds of my C++ game?

I would like to develop a Windows build of my Android game for testing and demo purposes. Most of my code is C++, using OpenGL to render, with a thin Android/Java layer that forwards touch events and loads resources.
My first thought was to make a Visual Studio project for my Windows version, as I'm familiar with it and the debugger is excellent.
Can I get similar C++ debugging functionality with Eclipse & CDT? It seems tidier to have all versions working from the same IDE, and it would be nice to become less dependant on proprietary software. Would I be able to add a Windows build configuration in CDT, switch over, and have the IDE launch & debug my Windows version instead? Or would I be entering a world of pain setting this up?
Are there any other approaches I haven't considered? All advice welcome!
CDT is a perfectly good Windows development environment. Just make sure that you have installed the Windows SDK.
If the concern is that Visual Studio puts a lot of the Windows-specific code in place for you, you might consider starting a new project in it. I'd avoid MFC. Just create a new Win32 project. Then, you could take that code and use it as the basis for your Eclipse project, folding in the platform-independent code from your original Android game.
You can easily come up with a cross-IDE solution using makefiles. I guess cmake could help you here.
You could try out MPC. It can generate VS solutions or Eclipse CDT projects(and some more). I've been using it at my previous job and it's really neat once you get the hang of it(which shouldn't be very hard). I'm not sure how well does it work in a
cross-compilation environment, as we were using it to build our project on PC for Linux/Windows.
There's no reason why you shouldn't be able to use Eclipse on WIndows as well.
As far as I know though (I haven't used Eclipse for C++ that much), Visual Studio still has the best debugger. (it can also be a good code health check to compile it with more than one compiler). So there may be reasons to go with VS as well.
If you do decide to go with VS for the Windows version, you may want to look into CMake for managing the build system, since it can generate Visual Studio solutions as well as makefiles and pretty much anything else you may need to build.

Anybody there succeeded debugging C++ in Eclipse?

I wanted to shift from Visual Studio 2008 to Eclipse Helios for C++ dev. I tried in mac and found a lot of unstabilities while debugging. Then I tried on Linux and similar. This is the last problem I found:
http://www.eclipse.org/forums/index.php?t=msg&th=205832&start=0&S=0b23d01871ba30eea27e36afdf03712d
At the moment I am going to give up eclipse. I would just like to know how many of you succeeded using Eclipse Helios CDT for debugging C++ programs or if I am just a dammned, isolated case, before I give up or continue trying to go forward.
I use Eclipse Helios as my C++ IDE. Os is Ubuntu 10.04. I use it regularly for debugging and can't remember to have ever had any serious problems. I had never problems with "unstabilities" while working with projects of significant size including Qt applications.
I would suspect you are an isolated case. If you are more specific, we might be able to help. If you want to abandon Eclipse though, I have heard good things about Qt Creator but still consider Eclipse superior.
The only thing that bugs me while debugging is that the debugger doesn't respect breakpoints inside of template functions and source code is not shown for template functions. If I recall correctly, this is different for Qt Creator but am not sure right now.
I use Helios as well on Ubuntu 10.04, and Windows XP to debug my Qt projects built with mingw.
I've never had a problem.
I've never tried on a Mac though.

Cross Platform C++ Tool Chain

Hello I am putting together a tool chain on my windows Box for Cross Platform C++ Development. I plan on using Boost.Build for building and Boost::Test for unit testing. I will be using Mercurial for my VCS because I can just throw the repo on my external HD and then pull it to either my windows or linux partition. The main thing standing in my way is editor compiler/debugger. Anyone have any suggestions?
With Boost.Build I can technically build with whatever compilers it supports easily. That means MSVC on windows and GCC on linux by using the same script with a flag.
Qt Creator using MinGW on Windows and the GNU compiler on Linux. That's what I use and it works perfectly well. Note that you don't have to use Qt when developing with Qt Creator.
May I suggest CMake on Windows and Linux as you can generate native Visual Studio projects as well as Eclipse CDT projects and plain-old makefiles.
If you are targeting multiple platforms, but find yourself primarily developing on a single platform, I highly recommend a continuous build/integration system to ensure a check-in for one platform does not break the build on the others.
Code::Blocks is a free, open source, cross platform C++ IDE. It supports the MS and GCC compilers, among others.
The main thing standing in my way is
editor compiler/debugger. Anyone have
any suggestions?
Yes: Qt Creator as one download and install will satisfy your three requests -- pick the 'LGPL' license route and download and install the SDK which even installs gcc, g++, ... for you. The integrated debugger is very good, and you get cross-platform behavior from both your code and your tools.
you can use gcc/g++ on windows as well. as for debuggers: gdb and ddd might be in cygwin. editor: vim (beware: it's really a programmable editor, not an IDE).
Vim, gdb, gcc/g++, makefile - you can use them on both - Windows and Unix :)
Yet another vote for Code Blocks or Qt Creator.
There are commercial tools too: beside Visual Studio there are MagicC++ (IDE), debuggers like TotalView, Allinea, Zero-bugs, UndoDB ... if you want to stay with VStudio check these VSBridge and WinGDB.
Anyway you can always use MSVC on Windows and other tools on Unix (gdb/DDD for debugging, vim/emacs for edition) - I've worked in this way a lot of years. Common environment for all platforms is nice, but sometimes it is very hard (almost impossible) to "force" it in company (especially big-company) ;-)