Ubuntu desktop development environment (GNU tools) - c++

I am setting up a Linux development machine (Ubuntu 9.0.x).
I want to know the best development environment for a C++ developer on Ubuntu - giving my background (see below).
5 years+ C++
5 years Visual Studio
Not much experience using GNU tools (GCC, GDB, make, etc.)
6 months or so of using Emacs at university (about 8 years ago!) - I don't remember anything though ;)
I come from a Windows background so am more at ease with GUI than CLI, although I expect to learn the CLI commands over time. I want to be effective and "hit the ground running" as it were, in terms of developing on Linux.
I am particular interested in tools that will make my life easier for:
1). project management
2). build configuration via GUI (rather than makefile editing - at least for now).
3). debugging IDE that allows me to set breakpoints and step in/out/over
It would be useful if the IDE suggested has a GUI to ease my transition to Linux, but is also customisable (e.g. can accept hand crafted edited make files etc. - when I have learnt how to create them). This will allow me to have more control over the build process later on.
Which set of tools would you recommend in order for me to achieve the maximum productivity in the minimum amount of time on my Ubuntu desktop?
So:
Which application (IDE) offers:
(i). easiest transition from Visual Studio (and ideally can use manully crafted make files)
(ii). extensive debugging capability akin to Visual Studio
for the latest Ubuntu (9.0.x) desktop OS?

As for C++ developing I'd choose Qt Creator IDE for easiest migrating from Visual Studio. I believe it can cover all your needs.

The best tools that you need are:
make
gcc
g++
Your Favorite Text Editor
auto-tools
Qt Creator
Glade
Your Favorite Project Manager
For Ubuntu I suggest you to use Glade, because Ubuntu uses Gnome(GTK).
About IDEs:
Eclipse For C/C++
Netbeans For C/C++
Code::Blocks
Kdevelop

I think you should just bite the bullet and learn enough make, gcc, and gdb to accomplish what you need to do at the command line. If you get that taken care of, you can use whatever editor you like to write the code -- even Visual Studio's editor.

Have a look at Code::Blocks. It's a nice IDE for doing C/C++ and comes with an own build-system. But be sure not to grab the version inside the official ubuntu repository but go to the CB forum and look for the latest nightly build. There are people maintaining repositories with ubuntu packages. I think CB is worth the hassle of installing the latest version.
Link to Code::Blocks Forum
Btw. I did an install some days ago. There are two people maintaining 64-Bit Ubuntu packages. Only one did work, though. It was this one.

You can use Glade Interface designer (glade.gnome.org) for interface design.
BOUML for UML modelling & project management
You can always use eclipse or netbeans for c++ development on linux.
Though I recommend Eclipse, it would automatically generate makefiles, debugging is very easy & you can configure your code repositories within the IDE.

Related

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.

Optimal Eclipse CDT (C++) experience in March of 2010

I am a student who will be using C++ next quarter. I really enjoyed using the Galileo release of Eclipse with Java and I would like to continue using Eclipse for for C++ development.
I am now experimenting with C++ development on Eclipse. I am running Eclipse 3.5 SR2 with CDT 6.02. My operating system is Windows 7 and I have installed MinGW-5.1.6. Version 6.3 of GDB is installed.
I have it compiling and stepping through code. However, I have the suspicion that I'm just crawling along and have yet to "shift the car out of first gear". I've spent about a week poking around on the Web to learn what constitutes and "optimal" C++ Eclipse experience. In particular, I'm interested in round-tripping with UML and unit testing.
My exploration of the Web became an archeological dig. I turned up how-to articles from 2003, alternative MinGW distros, references to plugins, dead-links, more references to plugins, passionate discussions on gdb bugs, and more references to plugins.
I no longer have any idea what might constitute an optimal C++ Eclipse environment. Would members of the community like to weigh-in on what they consider to be the current optimal experience for C++ development using Eclipse?
CDT 7.0 (out now in June) will have a preview of Codan, a static analysis framework for C/C++. It will highlight logic errors for you in "realtime", i.e. without having to wait for compilation. (It doesn't have very many checkers at the moment, but the number is growing, and you can also implement checkers of your own.)
CDT 7.0 also features a new debugger contributed by Nokia (called "EDC"), which allows debugging without relying on 3rd party tools such as gdb. This will also allow debugging of Visual Studio binaries, something which previously has been impossible.
The "Open Type" and "Open Resource" commands of CDT (and JDT also, BTW) is something I always miss when I have to do stuff in Visual Studio. Being able to locate any type by incrementally typing a part of its name is very practical, and Visual Studio has nothing close to it.
Integration with unit-testing is still missing, though. Not sure why that hasn't caught on.
Here is what I ended up with for a C++ development environment on Windows 7.
Compiler & libraries
Nuwen MinGW Distro.
It includes the Boost libraries which are necessary for the unit testing framework.
A big thanks to Stephan T. Lavavej for making this distribution available.
Debugger
The GNU debugger as built for Windows.
I copied the file gdb.exe into my C:\MinGW\bin folder and it worked well.
Thanks for Equation Solution for providing win32 and win64 binaries of the GDB executable.
IDE
Eclipse IDE for C/C++ Developers.
Unit testing framework
CUTE (C++ Automated Unit Testing Easier).
Download the Eclipse plug-in using Eclipse’s software installation . Add this URL to “Available Software Sites”: http://ifs.hsr.ch/cute/updatesite.
The CUTE Website has excellent installation and usage instructions.
I failed to find a round-trip modeling tool that was useful to me. Exploring free UML tools was like wandering through a city that had been bombed. Dozens of projects stood in various states of usability. Some projects were clearly active, some were clearly abandoned, but most were somewhere in between. Visio continues to be my pragmatic choice for creating UML models.
Seeing as none of the C++ gods here on SO have weighed in...
My last experience with CDT was about 1 year ago. I too love eclipse for Java, and while CDT "did the job", I didn't feel like it did it any better than Code::Blocks which I used for cross platform development.
Eclipse does have access to UMLet which is my favorite UML tool as it uses a very simple scripting language instead of the 'mouse-click-drag-double-click-type' hell that most UML applications turn out to be. However, UMLet can also be used as a standalone application which makes tucking it into eclipse accomplish little more than wasting screen real-estate.
In the end, I really don't think you are going to find many professionals developing in CDT.
On the linux side you are going to find developers using what they wish to use (Anjuta, Code::Blocks, Dev-C++, kdeveloper, EMACS, vim, etc.)
On the Windows side you'll find Visual Studio overwhelmingly followed by the IDE's above that happen to be cross platform.
In the end, if I HAD to develop in Eclipse; I would use CDT, UMLet, and Subclipse. After having done that I would probably long for my TortoiseSVN, Visual Studio, Code::Blocks, and UMLet standalone.
As far as any automated unit testing goes? Don't know, write my tests by hand. Hope that helps.

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) ;-)

C++ development for Linux on Windows

I am trying to setup a development environment for Linux C++ application. Because I'm limited to my laptop (vista) which provides essential office applications, I want to program and access email, word at the same time.
I'd prefer a local Windows IDE. SSH to a company linux server and using VI doesn't seem productive to me. Even using some IDE installed on the linux server doesn't seem good to me, because I can't do the work at home.
So does Eclipse CDT + MinGW work for me, or is there any other choice?
Thanks.
ZXH
Why not install a Linux virtual machine on your laptop, in VMware or similar? That way you can test while you're developing too.
You can also try http://cygwin.com/
Is it a GUI app? And do you have to target Linux specifically? If not, Qt (http://trolltech.com/) may be something that you can use. It would allow you to more or less develop your whole application on Windows, and then spend a few hours on a linux machine getting the whole thing ported...
Qt is the best choice. I develop with tis tool for a long time. And you can develop with the same ide : QtCreator and the same framework : Qt on MacOS, Linux based or Windows plateform...
Moreover, specifically on Linux, Qt is well integrated with Kdevelop !
If you have Visual Studio, which I feel is an excellent IDE, you can try to set it up to use GCC/G++. I've done this before, back in the Visual Studio 6 days. As long as you aren't using any Windows-specific libraries and write portable C++, you can compile and test on Windows, then periodically ensure that the code also compiles properly for Linux.
Another approach, one that I actually prefer, is to host your source and make files on the Linux box, share the files through Samba, then use your Windows IDE/text editor to edit those files. Then, you can do the compiling through an SSH terminal. Sure, you'd lose the convenience of being able to compile through your IDE, but at least you wouldn't have to muck around getting the compiler set up on Windows.
If you have a linux server available to you, you could also use NX to log in graphically, and use a Linux IDE there like Code::Blocks, or shudder Eclipse. Of course, there's nothing unproductive about shelling in and using VIM. I find it's a good way to shake out the IDE-induced cobwebs every now and again. Happy coding however you end up doing so!
I use (and recommend) Netbeans for C/C++ Development together with Cygwin to develop POSIX applications on Windows that will run on Linux/Solaris later on.
It is pretty easy to setup as long as you stick to the stable version of Cygwin.
I was in a similar position 2-3 years ago and tried several approaches, but the only one that really worked wor me was vim+ssh (+gdb, make, svn, etc). But again, I use vim even for Windows development.
This slideshow (PDF) walks through how to set up a cross compiler from Windows to Linux.

Good C++ Debugging/IDE Environment for Linux?

I have a friend who is trying to make the switch to Linux, but is hung up on the apparent lack of debugging/IDE environments for C++, especially as they relate to template programming. He has been using visual studio for years and is maybe a little spoiled by their awesome IDE. Does anyone have any good suggestions for an environment where he can, under Linux, develop and debug with all of the usual things (Breakpoints, line highlighting for compilation errors, step in/over/out/etc, etc) that he's accustomed to? Thanks!
How about Eclipse + CDT ?
Although many people think of it as a Java IDE, he could try NetBeans. I've used it on Windows for C and C++ development without a problem, and I know NetBeans is supported on Linux, so it would be worth a shot.
It looks like most of the features he wants are included in the C/C++ development toolkit, including integration with GDB, a profiler, and more.
Visual Studio is good, indeed.
On the free side:
Qt Creator is getting quite good too, it's worth a try. There are advantageous by-products coming from the Qt framework:
huge library - not only to build GUI applications but for other domains as well
portability on multiple platforms
A version 1.3 beta is available as a preview of the upcoming release but the current 1.2.1 is already all you need to manage projects.
Eclipse has already been mentioned, it's a very good environment offering many plug-ins (Mylyn, SVN, ...).
MonoDevelop somewhat supports C++ (more and more, I didn't check the latest version).
I've used Eclipse for C/C++ and it's pretty useful. It's also used at ACM ICPC World Finals http://cm.baylor.edu/welcome.icpc
I'd recommand Code::Blocks (but use a nighty build). It can be coupled with gdb to enable step by step debugging and all that stuff.
Not exactly an IDE but SublimeText 2/3 is available on Linux now. There may be a debugger plugin for it too, who knows.
Edit
Here's a gdb plugin for SublimeText
I havn't explored it personally, but Emacs has a C++ development addon that looks very much like a full IDE.
About 7 years ago I used KDevelop that was shipped with KDE. I found it quite good back than, and I hope it also improved with the time. I found it quite comparable to VC++ 6 at this time.
It also contains Qt support, if you are in need for some GUI toolkit.
Depends, Code::Blocks is good, Eclipse is very nice too, but you will need a very good computer. In my opinion the best choice iss gcc, gdb and ViM or Gedit.
My buddies from work use Eclipse + Scons, they also use Valgrind(spelling?) for tracking memory leaks and such.
Many of the IDE features you listed were debugger features. The ddd (Data Display Debugger) debugger is quite a nice GUI wrapper for gdb, allowing graphical representation of data structures, a non-crappy source listing window (ie. unlike the l command of gdb where you don't get context), and also allows you to use any and all native gdb commands directly if desired.
Have a look at CodeLite. It's available for Ubuntu and Fedora out of the box and even for Windows and Mac. So you can have the same IDE on different platforms.
We tried Eclipse and NetBeans but left them due to their huge CPU and memory usage. We have a development server and all the developers connect to it via RDC. Thats why these IDEs miserably failed in our model.
So, we looked for some native IDE. Found CodeBlocks to be very good and super fast. We sort of settled on it but later found CodeLite and liked it better than CodeBlocks.
I just seeing this question after 12+ years. AnyHow I just writing my answer. I personally use Quincy IDE for C and C++ development. it is very lite weight and debugging watch list is very much good and easy to use. I'm just attaching the link to the site. try it.
But you have to install it with wine.
Quincy <-- Click here