How to install C ++ plugin in Eclipse?

I apologize in advance for this noobish Q, but I'm starting to learn C ++ and only used Java.

I also searched here and elsewhere to resolve this issue and followed all the steps and still got this error.

I will try to be as specific as I can to help you guys.

I have eclipse helios and I would like to use C ++, but I continue to work in the error "Startup error. Binary Not found".

I installed the MingW C ++ compiler using the file "mingw-get-inst-20120426" and selected "C compiler, C ++ compiler, MSYS base system and the MingW developer toolkit."

Then I went to eclipse> project> properties> C / C ++ General> Paths and Symbols, then selected GNU C ++ on the Includes tab and added "C: \ MinGW \ lib \ gcc \ mingw32 \ 4.6.2 \ include \ C ++ "way

I also went to C / C ++ build> Environment and added to PATH "C: \ MinGW \ bin; C: \ MinGW \ msys \ 1.0 \ bin".

Then I created the Hello World C ++ project, selecting the MingW GCC under the Toolchains, and then built the project using the hammer icon.

However, as soon as I started the HelloWorld program, it received the error "Launch failed. Binary Not Found".

Here is another error: g ++ -IC: \ MinGW \ lib \ gcc \ mingw32 \ 4.6.2 \ include \ C ++ -O0 -g3 -Wall -c -fmessage-length = 0 -osrc \ HelloWorld.o .. \ src \ HelloWorld.cpp Internal Builder: cannot start the program "g ++": the system cannot find the specified file.

I also downloaded the CDT (C / C ++ Development Tooling) and transferred the "features" and "plugins" folder to the eclipse folder.

Can someone please give me step by step how to resolve this?

+8
c ++ eclipse eclipse-plugin
source share
5 answers

First , in the following examples, all drive letters must be replaced with the corresponding letters on your system. Not all of these steps are really necessary , but it works (and all the more fun).

Let's start with a slightly simpler release configuration - we want to compile it.

Go to Project - Properties

See if the include directories are correct and included.

enter image description here

Go to the project - Properties - Run / Debug settings - NEW - Main tab

Set to release and view in the Release folder of the project. If the exe file is not specified in its name.

Properties 1

Click on the "General" tab. Check the highlighting of the console and start in the background. Do not perform yet.

Properties 2

Go To Project - Properties - C / C ++ Build - Discovery Options

Tools - GCC C ++ Compiler

Browse to the bin mingw folder and select g ++. exe or copy mingw32-g ++. exe to g ++. exe

Note: Image points to mingw32-g ++. exe use g ++. exe

Property 3

Right-click on the project and look - "Configure configurations" - set "Active-Release".

Right-click on the project - Run As - Run Configurations.

In the C / C ++ Application select section, select the one that applies to the release version. Then click Run

If this works, I will show you how to set Debug properties. (more difficult)

+19
source share

Currently (Eclipse Juno and newer) it is much easier. You just need to:

  • Install MinGW (and including the C ++ compiler)
  • Add the path "C: \ minGW \ bin" and "C: \ minGW \ msys \ 1.0 \ bin" to your Windows variable "Path" (or wherever you install MinGW)
  • Install Eclipse. If Eclise is already installed, reboot it. he learns that MinGW is now available.
  • Create a new project: "C ++ Project"
  • For each project type, in the next dialog box you should now select the "MinGW GCC" toolchain
  • Happy coding
+9
source share
+1
source share

g ++ is installed as part of MinGW. If you get an error in Eclipse that it cannot find g ++, your path is most likely wrong. At the command prompt, you can run:

g++ --version

and it should display the g ++ version in the MinGW / bin directory.

Eclipse uses this path to search for included files and the compiler. Once you get the correct path, restart Eclipse and the issues listed in your question should be resolved.

0
source share

If you downloaded Mingw and restarted Eclipse, then

Do it:

 Go to Project--Properties--Run/Debug Settings ->Delete any launch configurations then GOTO: (RIGHT CLICK YOUR PROJECT)Project--Clean Project then (RIGHT CLICK YOUR PROJECT)Project--Build Project then run the project. 
-2
source share

All Articles