Using C++ with Eclipse - c++

I'm figuring out that there's two ways of writing C++ in Eclipse: either download the Eclipse IDE for C/C++ Developers or download the regular Eclipse for java and add the CDT plugin. What is the difference between these two? (Note that I'm already exstensively using Eclipse for Java) Thank you

The C++ tools end up the same so depends if you use Eclipse for other things.
If for other things then I would start with the more complex setup e.g. if you do Java J2EE I would download the Eclipse J2EE then add the C++ tools
If just C++ start with the Eclipse C++
I also found using the Yoxos/Eclipse Source packaging easier to download extra packages. (unless you need the absolute latest patch)
edit:
Sorry I did not read the question fully I have given the general answer. However as you have eclipse working and setup already and if you are happy then just download the C++ plugins. Note I have a separate workspace for java and C++ helps as you will want different perpecives etc and also cuts down on the projects in the explore rs/

Or use EasyEclipse for C/C++ and get a few other useful tools pre-integrated too.

Related

Using Eclipse with C++Builder 2007?

I have several (huge) projects written with CodeGear C++Builder 2007, making use of components, forms/"designs", etc.
Problem: The IDE sucks, especially the lack of proper navigation in the code gets on my nerves. I'm looking for an alternative IDE to use at least for the actual coding (and maybe for forms-design as well) that can read C++Builder projects (.cproj files).
I thought, if any open IDE can do it, its Eclipse... Other alternatives are welcome if you know them. But before I spend too much time trying to figure out how to make that work--- Does anyone have experience with this and can confirm/decline whether I can use Eclipse to work on C++Builder projects?
Yes, Eclipse works as an IDE with C++Builder. I regularly do my coding in Eclipse and use C++Builder for the compiling, form designer, and debugging. (Eclipse should be able to invoke a command-line build of C++Builder and look for errors, but I've never tried this.)
Eclipse doesn't need to be able to read .cbproj files; instead, create an Eclipse project in the same directory as your C++Builder project, manually set up your Eclipse paths and includes to match your C++Builder project, and let Eclipse go from there.
I'm currently using Eclipse Helios, which is rather old. Newer versions of Eclipse CDT improve its ability to parse C++, but unfortunately, this seems to cause it to reject more of C++Builder's C++ extensions. I haven't yet investigated to see how to best handle this.

C++ IDE Eclipse

I am looking for a C++ IDE, typically for debugging purpose. In particular, where I can navigate in source code; say method definition, member declaration etc.
I am a Java developer and use Eclipse. I create J2ME project in Eclipse, build it and finally deploy it at same place. At the time of debugging I can easily trace out what I am looking for.
For C/C++ support I installed plug-in "Eclipse C/C++ Development Tools".
After installing above plug-in, C/C++ code open with font/style/color...but not able to navigate :(
Please help me.
Thanks,
Amit
the cdt plugin from eclipse works fine for me. Perhaps you should update to the latest version and make sure you change your perspective to c++.
Another great c++ ide is qtcreator.

Additional Refactoring for Eclipse CDT

Is there any way to configure or are there any 3rd party plug-ins available for Eclipse CDT (any version) that provide a rich set of refactorings? My refactoring menu only provides the following in Eclipse Indigo CDT:
Rename
Extract Constant
Extract Local Variable
Extract Function
Toggle Function Definition
Hide Method...
I am looking for something with the richness of either the Java refactorings:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
Or something like what DevExpress Refactor Pro offers:
http://www.devexpress.com/Products/Visual_Studio_Add-in/Refactoring/
Note that the DevExpress plug-in is not compatible with Eclipse. I am more than willing to pay for a good 3rd party plug-in (it just needs to support C++ in Eclipse).
Most of the refactoring features in Eclipse CDT are developed by people working and studying at the HSR Hochschule für Technik in Rapperswil Switzerland. There are students working on new refactorings and enhancements. After they had been reviewed they will be integrated into the official CDT.
For more information of the ongoing development get in contact with the leader of this projects Peter Sommerlad at the IFS.
Beside from this projects I think there is no other plugin/extension on the CDT platform.
I miss the additional features, too, but I guess, they are currently not available as eclipse plugins: at least I did not found any, except for announcements.
C++ is hard to parse.
Is there any way to configure or are there any 3rd party plug-ins
available for Eclipse CDT (any version) that provide a rich set of
refactorings?
Sure, it's possible. For example:
http://www.eclipse.org/articles/article.php?file=Article-Unleashing-the-Power-of-Refactoring/index.html
As far as finding exactly what you're looking for (either commercial or open source software) - and finding it for Eclipse (as opposed to simply purchasing a different IDE) - well, that's "iffy". For example, I make heavy use of Embarcadero Delphi at work. It's refactoring capabilities run RINGS around Visual Studio. Visual Studio, in turn, is far better than the default Eclipse. But hey - I use "vi" and a makefile whenever possible, so it's no big deal.
Suggestion:
Try an eval version of a major vendor's C++ compiler, and see where it takes you. Two suggestions:
Intel
http://software.intel.com/en-us/articles/intel-compilers/
IBM
http://www.ibm.com/developerworks/downloads/

Build management in C++ & good IDEs on Linux

I am starting to write a moderately sized project in C++ requiring a fairly large amount of files and dependencies on other projects.
Do you think manually maintaining a Makefile for this project is the best approach?
Are there other better alternatives for C++ that make build management and dependency management of files really easy to handle?
Also, what IDE is good for C++ development on Linux? I am comfortable with Vim, but do you think there are good IDEs for C++ (like Eclipse for Java) that provide code-completion etc?
Thanks!
Ajay
Others have already recommended using CMake. To my mind you should manage your project with CMake then decide on your favourite IDE.
CMake allows you to describe the project to be built, instead of how to build it. For example: I want to create a shared library called foo with source files a.cpp, b.cpp and c.h and it requires these link dependencies. Then on unix you get libfoo.so and on windows you get foo.dll and foo.lib. All common project settings can be abstracted up to higher levels in the build tree, this keeps most files very simple. More complicated requirments can be refactored into macros.
Once your project is described like this CMake will generate makefiles and/or IDE projects. This means each developer can choose their own IDE, as well as allowing you to mandate an IDE if appropriate.
My company use CMake to build the c++ in our product on windows and solaris. It contains 600 projects and 1.5 million lines of source code. We originally chose it as a cross platform build utility when porting to solaris, however for a large project like ours it is much easier to manage the build with CMake than with Visual Studio project files. I would recommend it as a build utility for any c++ project of any size
We use the eclipse cdt on solaris and are very happy with it. Most of our development is with visual studio on windows. cmake also works well with other ides I use it with KDeveloper4 on linux at home without a hitch.
KDevelop4 (from subversion or rc1 from their site) + CMake makes life so much easier, automake should just die.
If you want a cross-platform solution, netbeans + the c++ plugin are pretty decent, not as good as kdevelop4 though.
I like CMake a lot for the whole building process (but I have almost no experience with scons or Jam).
I use vim or qtcreator. Qtcreator is still in developpment, but very promising I think.
I suggest you Code::Blocks. I use it on Debian and works gracefully.
http://www.codeblocks.org/
Edit: Added another link
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks
Eclipse does C++ as well - through eclipse CDT - not as comprehensive as Java but pretty good.
Manually maintaining Makefiles in larger Projects becomes quite painful. If you start using automake/autoconf, you will - after a while of learning all the facets - appreciate the powerful possibilities these tools can offer.
And as IDE simply use Emacs. It's quick, powerful and supports Code completion etc.
There's also Code::Blocks as an IDE with its own building system. But I would encourage you to try out other build tools (CMake, Boost.Build, SCons) if you want to be able to build your software "anywhere" without having a fancy schmancy IDE installed. ;-)
I found Emacs + Scons works pretty well for me.

open source dev environment for C++: what's better? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to do some coding in my spare time, but the thing is, I don't want to spend the money on this.
Would the following set of development tools be The Right Thing, or is there something I'm forgetting?
Eclipse for C++
SVN for source control
Qt for UI development (since it's C++, and I believe it's now opened by Nokia)
hudson for continuous integration
I'd like to write a little image processing application that can run on any platform, but the main platform at the moment will be Windows with a possible movement to the Mac-- hence all the cross-platform tools.
Is there anything really obvious I'm forgetting? Like something like fxcop for style checking in C++?
If I use any libraries, I'd like to avoid GPL libraries; if things go south with my current employer, I'll want to monetize this.
Microsoft Visual C++ Express is free and easily the best IDE for Windows. Furthermore, you can use it to work on cross-platform code - it more depends on writing standards-adhering code and using portable libraries.
If you want to write cross-platform code, I recommend a cross-platform build tool. I use CMake, which generates Visual Studio solutions on Windows, but there are others too, such as SCons.
As for libraries, it depends on what exactly you need to do. Qt is an excellent GUI library. libpng/libjpeg and others are good for loading/saving images at a low level, but there are probably other higher-level image libraries as well.
[edit] A response to the comment about MSVC and Qt:
A quick search brings up Trolltech's Qt Visual Studio Integration page:
Qt Visual Studio .NET Integration
A comment points out that this is actually not free (a free addon is available at this link, but this runs Qt designer outside of Visual Studio. Also, the Express version of Visual Studio does not support plugins.
For coding specifically in Qt there is another new IDE created by Qt: Qt Creator. I've heard good things about it, and it is also portable across Windows, Linux, and Mac.
I detect procrastination (something I'm often guilty of) - just write some code - you can always add tools as you go along.
The problem with questions with phrases like "what's better" is that it's really hard to determine what's right in a specific situation and maybe impossible what's "better".
Said that, I use Eclipse CDT sucessfully as an IDE on Linux. I use frameworks like ACE/TAO to create code that is highly portable.
I know that QT is a very good UI framework. KDE is built on top of KDE and if you use KDE/Linux then you may also want to look at KDevelop, a C++ IDE that has many users.
In the end I believe that you and only you can figure out whats best for you to use. Make sure you check the alternatives and then make an educated decision.
for c++ there are a few more freewares available such as codeblocks and devcpp. I find eclipse very heavy on the machine.
There are many tools that make the difference:
A C++ compiler ... (it wasn't in your list)
doxygen
STLfilt (which is a must have when programming in C++)
A UT framework (CxxTests, boost.test, Fructose, google.test, ...)
something to manage the compilation chain (scons, aap, (b)jam, cmake, ...) -- I've no idea what eclipse is using.
Source control: git. It's not as diffucult as people make it seem. I'm an svn newbie and I still managed to learn the basics of git for use in everyday life! There are about 4 or 5 basic commands that will get you going in no time. Read the official git tutorial
Regarding IDE's, there are a few choices
Microsoft Visual C++ Express Edition (free lite version)
Eclipse with CDT
QtCreator. (Since you're using Qt for the GUI)
Personally I have used Eclipse+CDT for a number of projects. Paired with wxWidgets it has provided me with enough to keep myself pretty much crossplatform (which I think is a big plus).
Also QT has some interesting releases with an IDE now, make sure you check it out: http://www.qtsoftware.com/products/developer-tools
Like earlier suggestion, just start coding, you will eventually find out what is the appropriate mix for you. It varies greatly between individuals what is the "best" IDE or mix of command line tools, etc.
Eclipse CDT is making huge strides, and even organizations that were unx tools only are now finally joining the IDE bandwagon. Considering downloading a current milestone, not the official release.
If you're using windows, don't use Eclipse directly, find a third-party distribution that already has all the GNU tools in it (I forgot the name, I can look it up).
Once you switch to mac it's easier, but make sure to install xcode to get your GNU tools.
If you are using svn - VisualSVNServer is an excellent free GUI based way to setup and administer your SVN repository, definitely worth checking out as it means you have little/no messing about with config files etc. to change your repository.
Regarding version control - Subversion is pretty much standard and is very well supported. From what I've heard, Git is more powerful but harder to use; it's worth a look for a new one-man project, since you wouldn't have the support and retraining concerns that other projects would have.
Regarding IDE, since Visual C++ Express is currently the highest-voted answer - I've used both Eclipse and Visual C++ Express. I don't have a whole lot of experience with Visual C++ Express, so it might have features that I've overlooked, but from what I've been able to compare, Eclipse offers a lot more features. I tried to list its more impressive features in this answer; from what I've been able to see, Visual C++ Express doesn't have any of the features listed there. Eclipse is slower and more resource-intensive, but with a fast enough desktop, its extra features are more than worth it.
In terms of version control, use git and throw your project on GitHub or Gitorious. There's really no reason to use Subversion anymore, due to its painful branching and merging, and lack of a distributed model.
See this link here for why Git is better than X:
http://whygitisbetterthanx.com/
There's also no point in using Sourceforge or GNU Savannah, as the Git front-end sites have much more valuable features and are easier to use.