Eclipse Linux stock "Hello World"-app doesn't run - c++

I've been developing with C++ in VS2010 but now I am trying to convert
my apps to build and run under Linux. So I've installed Eclipse Indigo
and the CDT package on an Ubuntu linux machine.
When I create the stock "Hello World"-project for C++, I get the
classic "Binary not found" error message. I've combed the internet,
but found no solution.
Through my findings I have gone to:
Project -> Properties -> C/C++ Build -> Tool Chain Editor
and changed the Current Toolchain from Linux GCC to MinGW GCC.
But after rebuilding the project I still have the same error message.
Any suggestions?

The gcc package doesn't necessarily include the C++ compiler. Try:
whereis g++
on the commandline (or g++ -v) to check if it is installed...

Related

Eclipse Can't Find MinGW/Can't setup C++ on Eclipse

I am trying to setup c++ in Eclipse IDE. I have installed the C++ Development Tools and C++ Development Tools SDK. I have read "Before you begin" in "C/C++ Development Guide". I have installed MinGW on the page it provides. It installes it to C:\MinGW which Eclipse said it could recognize. I create a new makefile C++ project with MinGW selected as my tool chain. I had to uncheck "Show toolchains only if they are supported on the platform". It doesn't work. I have spent hours on trying to make this work.
You need to tell Eclipse where to gcc.exe and g++.exe.
In your case I would expect that to be C:\MinGw\mingw32\bin or C:\MinGw\bin.
If there's no gcc.exe and g++.exe there, it would appear your MinGW setup is broken.
Note that plain MinGW is a not very well maintained or up to date. I would recommend switching to MinGW-w64, which exists for both Windows 32-bit and 64-bit. A standalone build for Windows of recent MinGW-w64 can be downloaded from https://winlibs.com/. Just extract the file (no installer needed) and point to the mingw32\bin or mingw64\bin folder to find the compiler toolchain.

Cannot run program "sh" eclipse C++ project in windows 7

I'm on Eclipse Luna for C/C++ developers. Compiling a Hello World project works just fine. But now I'm working with a project I downloaded via SVN and can't get it to build correctly.
The problem shows "CreateProcess error = 2 the system cannot find the specified file" Type: Configure Problem.
From what I've looked up this is caused by having configured an Autotools project, but in C/C++ build -> Tool Chain Editor -> Current Toolchain I have set up MinGW GCC instead of GNU Autotools toolchain. Any ideas on what could be causing this problem or how to fix it?

Eclipse Juno CDT running in Linux - it does not give me any toolchain

I am using Slackware 14 and latest Eclipse Juno.
As a regular Eclipse user, I installed CDT just like I always did. However, when I create a new project, there is no toolchain available. Screenshot here:
I remember I used to get the default GCC toolchain available as soon as I have CDT installed in Linux. Even if using BSD, I could install GCC cross compile toolchain and it just works for native GCC as well. I tried to install the cross compile toolchain and CDT does not pick it up.
Please offer your suggestions, thank you.
you should install it from help menu
I had the same problem. At some point, I could program in C++ with Eclipse. One day, it can't find any tool chain even when there are a couple of them. Basically, you need to reinstall your CDT plugin with assumption that you installed your tool chain in a correct place - for this, you need to refer to instructions for your Linux distribution.
Here is what I did without changing anything on toolchain:
Uninstall CDT from Eclipse
Help -> Install new software -> Click the link "Already installed" -> Select CDT items -> Click Uninstall
Install CDT again
This got me my toolchain back in Eclipse.
In case reinstalling does not work, it means you have unsupported toolchain for some reason. Uncheck Show project types and toolchains only if they are supported on the platform on the new project dialog. Then it will show the toolchain. You can go ahead to select the toolchain to create the project. But I'd try to find why the installed gcc is unsupoprted.

"Hello World" fails to run. Eclipse (Galileo) CDT plugin problems with MinGW and Cygwin on Windows Vista

Trying to run a simple Hello World C++ program on Eclipse (Galileo) CDT plugin on Windows Vista. Following the "Before You Begin" instructions for Eclipse/CDT...
1) Downloaded and installed the latest Cygwin. However, could not compile with Cygwin.
Internal Builder: Cannot run program "g++": Launching failed
the Eclipse CDT docs say...
currently Cygwin >= version 3.4.4-999 is not supported since gcc and g++ commands cannot >be launched from the windows' native shell
It seems to be a typo (Cygwin version is at 1.7.7) but running cygcheck -c, I get the version of g++ which is 3.4.4.x.
Hence I assumed that this version of g++ cannot be run from the command line. So gave up on Cygwin.
2) Downloaded and installed MinGW, gdb, MSYS.
This time, it was able to compile, but when trying to run, I get a popup saying that
the program Hello.exe has stopped working
You should use either Cygwin, or Mingw, because their dll's might conflict if they're both discoverable via %PATH%.
Show your build process (copypaste text from your build console) and %PATH% contents.
The simplest solution was to install the latest Eclipse (Helios SR1) and the CDT plugin.
I needed to also delete the old projects/import old source into new projects.
For Galileo, see:
http://sourceware.org/ml/cygwin/2010-03/msg00510.html
http://dreamlayers.blogspot.com/2010/01/eclipse-incompatibility-with-cygwin-17.html

Getting eclipse c++ set up on linux?

I downloaded the c++ version of eclipse from the eclipse website. This installed then when i ran the basic hello world code, it wouldn't compile.
What else do i need to install to get c++ compiling on eclipse? I thought linux already had what it needed for c++ building/running? Ive googled around but the advice is for older versions of eclipse and the screen captures show options not available anymore.
I'm on Ubuntu 64
Eclipse CDT needs a makefile to build.
You need:
GCC
Eclipse
Eclipse has a built-in option to create a "helloworld" app. You simply go to File->New->C++ Project->Hello World C++ Project (Under the executable dropdown)->Enter a project name->Finish
Then you just click the run button and you should see "Hello World!!!" in the terminal at the bottom of the Eclipse window. If you still get this same error you did previously respond to this and I'll show you how to check to see if you have gcc installed.
If that doesn't help visit this blog post from July 2010 detailing how to achieve your goal.
http://max.berger.name/howto/cdt/cdt.jsp
-AHC
You should already have gcc but try this just in case:
sudo apt-get install gcc
If that doesn't do anything then you have gcc installed and the problem is probably with eclipse.