Adding C/C++ language to Eclipse Oxygen IDE for Java Developers - c++

I'm running Eclipse Oxygen.1 IDE for Java Developers 64 bit and I want to add the C/C++ language to it so I can write and compile code for my C Language class using only one IDE. When I go to install new software am I supposed to be installing the development tools for under the programming language tab or from the CDT tab or both? The tools under the Programming Language tab are version 9.3.2 and the tools under CDT tab are version 9.3.0. I'm confused as to which ones I'm supposed to install. Also if anyone could help me with the installation of MinGW. I'm running Windows 10 on a 64 bit operating system. And I'm not sure as to how I can get the latest version of MinGW for 64 bit OS. Any help is appreciated. Thanks!

You can have a combined IDE. I use one that combines the Eclipse SDK, including Java and a bunch of other things all in one. It's a bit clunky to do but can be done. Just go to the Help -> Install New Software... menu item and bring up the install dialog.
First install one of them, Java or C/C++. Then after launching it, select the "Luna - http://download.eclipse.org/releases/oxygen" item in the "Work with:" selector. Then find the other IDE components you would like in the list and install it.

I had Oxygen with java and pydev but experienced great difficulty adding cdt yesterday. I have some good reasons for keeping Oxygen instead of upgrading (older code and even OS compatibility since I'm still running High Sierra, again there are reasons for doing that). One key is finding the url given above download.eclipse.org/releases/oxygen . However, my install would still not work, for some unknown reason.
Here is the important part of my comment. Installs and updates can take forever if you don't uncheck the box on the install page which says this:
Contact all update sites during install to find required software
It is a known bug, that it is checked by default, but never to be fixed. https://bugs.eclipse.org/bugs/show_bug.cgi?id=340298
Also this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=340298 was applied to cdt 9.3 if you get the pty error trying to compile.

Related

Eclipse CDT documentation on C++ autocomplete

I was trying to set up my development environment on Eclipse CDT for C++ and although the auto-complete is working (it finds classes like vector and such) it shows no documentation on C++ stuff, only C stuff (fopen, fclose, malloc) has documentation appearing on the auto-complete.
Some notes:
I'm using Linux Mint and Eclipse Kepler Service Release 1 Build id: 20130919-0819
I had to manually install g++ on my Linux. I used 'sudo apt-get install g++-4.7' to install it
I had to manually place "/usr/include/c++/4.7.3/" on the GCC C++ Compiler Includes in the Tool Settings in the project properties to get it to compile.
Any ideas on how to get the documentation in there?
The help on C is provided by Libhover plugin. The developers tried to support C++ but seems these efforts did not get much traction.
C++ hover is actually installed by default in CDT. If not, you can install it manually (at CDT site look for "Plugins for C/C++ library hover help." and "Plugins for creating hover help from installed C devhelp documentation").
However, it is not enough. To get hovering help similar to C documentation you have to generate Doxygen XML for your library, e.g. for STL. Details are provided in hover documentation

Installing OCaml

I would like to start programming in OCaml. As I am a Windows user, I understand that it is preferred to do so using the OCaml plugin for Netbeans.
I have downloaded the aforementioned plugin from the following link: http://ocamlplugin.loki-a.com/ocamlplugin/updates/ . I have installed the plugin into Netbeans as instructed. I managed to open a project but even the sample "Hello World" won't run.
I then tried to install the OCaml IDE from here: http://ocamlplugin.loki-a.com/index.php?title=Main_Page#Download_2 , but it still wouldn't run anything.
I am not interested in working with Eclipse because that would include downloading Cygwin.
I would appreciate a simple solution. Thank you! :)
I would suggest OCaIDE under Eclipse, if you stick to Windows anyway.
But I don't understand your reluctancy to use cygwin, especially when there is such nice step-by-step tutorial for configuring cygwin for OcaIDE and Eclipse.
Another option, which I haven't tried but would strongly suggest you trying, is Sublime Text 2. It supports OCaml and is a very popular cross-platform text editor. But since I haven't tried it, I would not be able to provide you with details about it. Although it comes with a cost, you can evaluate it for free without time limit.
TypeRex has been my favourite for OCaml so far, and you can now use Emacs in Windows, so with some workaround in cygwin you can use TypeRex in Windows.
Another option is to use VirtualBox, install a normal linux distro and use Typerex+Emacs inside it. It is also not complicated, as it takes 1 hour to config at most.
The ocaml links that you gave have not been touched since 2009 (4 years ago). That probably means the odds of them running with the current NetBeans are equivalent to the proverbial sphere of solidified water in the Christian place of eternal theological punishment.
Since you are asking about running under Cygwin, it sounds like you want a Linux version of Eclipse as well. Eclipse runs quite well under Win7, at least, and under Mint (I use them under both) However, all my attempts to get ANY OCaml IDE running under either system have been borged (resistance is futile, and depends and capacitance anyway).
So, under Mint 15, emacs and vim (the old standards) work well as text editors. I wish I could suggest anything else.
Good luck!!!
By now, another option has appeared for Windows 10 users wanting to use OCaml: the Windows Subsystem for Linux.
Basically, what it does is that it allows you to run Bash and any non-GUI Linux program on your PC. Once installed, you can install OCaml and OPAM with apt-get and you're good to go.
As far as I am concerned, I use Windows 10 on my desktop PC, and I haven't had any inconvenience with WSL yet.
I personally use Merlin/... which is are plugins for emacs. But I can understand that you dont want to use emacs. I have been told that the support with Visual Studio Code is supposed to be quite good, especially when using it together with the builtin console. Also for smaller things there is Ocamltop but I have now idea how the Windows support is. In the end I suggest, using the Linux Shell on Windows as RichouHunter suggests.

Eclipse C/C++ projects on mac

I am using Eclipse classic 4.2.1 (Juno) on my new mac to develop c/c++ programs. When I create a new project their is a choice of "Toolchains" to use: Cross GCC, MacOSX GCC and XL C/C++ Tool Chain.
Which one should I choose? I also use the mac terminal to run, make and vim the same code sometimes.
Maybe GCC is in common use if your app will run both in mac and windows
I had the same problem on my Mac OS X Luna(eclipse 8.4) but they are the same edition in general. Just goto the Help tab and click on "Install new software..." or anything similar to that. Type this in the big obvious add software link (pretty much just the test input at the top of the new opened window):
http://download.eclipse.org/tools/cdt/releases/juno
if you think juno can handle the newest version, type this in:
http://download.eclipse.org/tools/cdt/releases/8.4
Select every thing and proceed with the download.
You should now be able to create C/C++ projects and source files. I found this to be slightly buggy, like sometimes not include the standard C++ library, or std does not even exist but this should work if you install the correct version.

Ubuntu desktop development environment (GNU tools)

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.

Setting up a Programming Environment in Linux [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I recently started using Linux as my primary OS. What are the tools that I will need to set up a complete programming environment in Linux for C and C++?
Standard stuff:
The compiler tools, gcc, gdb, etc.
Some sort of editor/IDE (emacs, vim, eclipse)
Profiling tools
Source Control (SubVersion, git, etc)
Language specific tools, like easy_install for python (you said C/C++, but the same goes for everything)
A web server maybe? Apache, Lighttpd, nginx
Any libraries you'll be using. Are you doing kernal hacking? Driver development? opengl?
Among others you should also have gprof and valgrind ( or something in it's class ).
Vi (or emacs), gcc , make
Tradiationally unix development is more commandline than ide. There are very good IDEs, the main ones are probably eclipse and kdevelop
It depends on your definition of "Complete programming environment", and whether you are using C, C++, or both (C/C++ is an awful term that shouldn't be used. Either it's C, or C++).
If you are looking for an IDE, Eclipse/CDT is the most highly-recommended one from my experience (I don't actually use any IDE, so I can't offer first-hand advice).
If you can cope with command-line control (and in the end I find it makes things easier to do and doesn't take a whole lot of getting used to), a simple text editor with highlighting will suffice. I prefer KATE (part of KDE), as it features a built-in terminal as well as many features you would expect from an editor inside an IDE, like code folding and regex search/replace.
Many people also recommend Vim or Emacs, both of which are probably available through your distro's repositories. (Eclipse is probably available too, but in my experience the CDT is confusing to install via packages. YMMV). They are both ancient editors; and there is a powerful holy war between the two, so I won't get involved.
Your compiler should probably be GCC - on a Debian system, installing the g++ package as well as build-essential should be enough to get C++ going (build-essential should contain the gcc package required for C development). Whatever your distro, GCC is probably easily available or else already on your system.
Seconding swilliams, I'd say the basics are:
an editor or IDE (I use vim),
a compiler (almost certainly gcc)
make, or maybe some other similar tool like ant if you want
a debugger (almost certainly gdb)
source control (I use subversion)
Standard unix utilities like grep and diff, but you have those already
Other than that, I'd say install as you go. Linux is more about little utilities that each do one thing than monolithic development environments that do everything. So if you find yourself needing something, you can always just install it, be that thing a memory profiler, a documentation generator, a bigger/smaller/more different editor, et cetera, et cetera.
What distribution are you running?
In Ubuntu or any Debian based distribution you can issue the following command to install all the necessary tools.
sudo apt-get install build-essential
From there you can install your SCM solution of choice and an IDE if you prefer or just use your favorite text editor.
The simplest of answers is an editor (take your pick - at least one is already on there) and gcc/g++.
If you want an IDE, there are a slew of questions related to that on SO :) (including this one C++ IDE for Linux?).
Kdevelop is a well regarded and well written IDE for Linux, installing it should get you every other tool you might want to develop with installed as well and and IDE to go with it.
By "every other tool" I mean gcc, grep, diff, autoconf et al should be grabbed by the package manager and installed at the same time, but I could be wrong. I don't have a standard distro on hand to test that with.
Personally, I use vim, but I have used kdevelop in the past.
vim/vi is handy because you know that some form of vi is always available on every unix platform.
I have to correct my post. I just looked at the package requirements for kdevelop on ubuntu... it does NOT appear to require gcc and install it automatically
If you want something very easy to use, with ability to import visual studio projects, and a feel much like VS, give Codeblocks a try. Its quick ( since its not Java based ) and in general works well.
Another great utility that you can use are *nix man pages. Each function in the C library has an associated man page.
For example:
man printf
man strncpy
...
I took an old windows laptop with a dead hard drive and
replaced the hard drive then installed Ubuntu (linux / debian
all in one handy release) on it. I had to burn the ubuntu
installation files onto a cd first on another working computer.
Here's where I got my linux from (complete with desktop gui, very
easy to install, lots of programs to use, it was my first linux
but not my first unix):
http://www.ubuntu.com/getubuntu/download
Then i installed Netbeans for my integrated development environment (IDE)
altough I am using it for java -- but it comes with c++ support as shown below:
http://www.netbeans.org/features/cpp/
I also installed mySql, you didn't ask, but that is another key component
that completes my development environment.
Good luck to you.
On most distros, everything you need will be installed by default (very few don't include gcc, they all include some kind of editor). I generally do my development in Vim (or gVim, which is the graphical version -- the best of both worlds). For those times when I'm feeling the need for a "real" IDE, Eclipse with the Vim plugin is really nice. It's almost like working in Vim, except you get the Eclipse stuff -- again, best of both worlds. The Vim plugin for Eclipse that I'm using is not free, however :( I believe there is a free one, but the last time I tried it, it wasn't very good.
Personally I use Ubuntu w/ Eclipse CDT. Eclipse is what most people might think of as a Java IDE, but CDT is a set of extensions that really tune it for C/C++ development. It's smart enough to figure out what toolset to use (MacOSX GCC vs Linux GCC, for example).
Eclipse CDT Website
For best results, currently the 6.0 JRE for Ubuntu seems to have problems with recent Eclipse versions, so what I did was remove the 6.0 JRE and run:
apt-get install build-essential
sun-java5-jre sun-java5-bin
Then grab the latest Eclipse from the website, unpack it in a directory.
As a final touch, edit the eclipse.ini file that comes with Eclipse and add this line to it:
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
This will further stabilize the app, making it as rocksolid as Windows or Mac.
If you prefer commandline tools over GUI tools, some ones I use regularly:
CMake -- Portable build tool. It's easy to use and can output a variety of formats like Makefiles or Visual Studio files.
apt-get install cmake
Vim -- VI improved, if you want a text editor with some bells and whistles. Otherwise, just use 'nano', which comes with Ubuntu.
apt-get install vim
Twe options, you must make your decision now and never look back, or risk being burned at the stake:
a. Emacs
b. vi(m)
Do not listen to any rational arguments before choosting... listen to the light inside yourself...
Install a lot of bell a whistles for the editor you choose, vi is usable but no fun.
vim is fun, but vim with extras is great.
(And the same is true for Emacs even if that means installing tetris and a doctor ;-) )
/Johan
Two must haves are guake and pithos. I cant see how any one can have a list of dev tools without these.