Alex Rivera | Logout

Configure Eclipse CDT to use g++

Asked 2011-12-11T22:12:49.030
10

I have cygwin installed, and I want to use Eclipse with CDT for development under Windows 7. However, I get following error:

**** Build of configuration Default for project hello_cpp ****

make all 
g++ -O2 -g -Wall -fmessage-length=0   -c -o hello_cpp.o hello_cpp.cpp
process_begin: CreateProcess(C:\cygwin\bin\g++.exe, g++ -O2 -g -Wall -fmessage-length=0 -c -o hello_cpp.o hello_cpp.cpp, ...) failed.
make (e=5): Access denied.

make: *** [hello_cpp.o] Error 5

**** Build Finished ****
  • I'm able to use g++ as standalone compiler.
  • cygwin /bin folder is added to path.

After googling I found out that C:\cygwin\bin\g++.exe is a cygwin symbolic link and Windows doesn't understand it and I need to point to the g++-3 location directly. How do I do it?

Edit
Report

2 Answers

1

You can go to

Project Properties Page > C / C++ Build > Settings > Tool Settings

And change the command as you want. Documentation here.

answered 2011-12-15T14:02:30.277
0

Refer this link, it shows how to setup eclipse for native development with ease. everything is done in eclipse except setting environment variables.

answered 2013-06-19T03:53:41.530

Your Answer