Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Why do I have to jump through hoops to set up the CDT?
Why do I have to jump through hoops to set up the CDT? [message #1778486] Thu, 14 December 2017 18:41 Go to next message
Jake Hyde is currently offline Jake HydeFriend
Messages: 1
Registered: December 2017
Junior Member
// Preamble - Just Background Info
I am about at my wits end here. I used VS2017 as my C++ IDE, but I found the idea of having one program like Eclipse for my development enticing. First came installing a toolchain: Cygwin seemed like a good choice. Still an error every line.
// Problem
I have managed to include a few folders so <iostream> now does not have an error, as well as std. cout and endl STILL cannot be resolved and building the project of course says that the binary cannot be found (no exe is built either). Below is the Hello World application I am trying to run:
// Info
#include <iostream>
using namespace std;

int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}

// Errors
Program "g++" not found in PATH
Program "gcc" not found in PATH
Symbol 'cout' could not be resolved
Symbol 'endl' could not be resolved
// Extra info
I have spent the past few weeks combing these forums,the stack exchange, and google for anyone that solved a similar problem. While I did narrow my problem down, I feel as though setting up CDT for Eclipse does nor should not be this difficult and would like some insight into how exactly I can solve this problem.
Re: Why do I have to jump through hoops to set up the CDT? [message #1778548 is a reply to message #1778486] Sat, 16 December 2017 16:29 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 361
Registered: August 2014
Senior Member
It seems that a) your installation does have the C and C++ compilers installed into Cygwin and/or b) Eclipse does not have a serach path to the Cygwin tools.

Please open your Eclipse and from the menu Help -> Help Contents -> C/C++ Development User Guide, items Before you begin and Getting Started; and follow the instructions there.


--

Tauno Voipio
Re: Why do I have to jump through hoops to set up the CDT? [message #1778915 is a reply to message #1778548] Sat, 23 December 2017 18:58 Go to previous messageGo to next message
Vaclav Sal is currently offline Vaclav SalFriend
Messages: 161
Registered: September 2014
Senior Member
Welcome to Eclipse (forum?) , where one posts, hundreds read and no one rally answers you question.
Eclipse is "Swiss army knife" - to program in C/C++ do "Help->Install New Software...
Than select all sites and filter with "CDT" ,
You do not have to filter , but than things slow down on initial load - tons of stuff you probably do not need.
Question remains - how did you manage to write default "hello word" in C (?) without GCC ?
Also pay attention to "Configuration" - another set of blades on your knife.


Re: Why do I have to jump through hoops to set up the CDT? [message #1779590 is a reply to message #1778915] Wed, 10 January 2018 02:43 Go to previous messageGo to next message
Andrey Sotnikov is currently offline Andrey SotnikovFriend
Messages: 17
Registered: October 2014
Junior Member
Vaclav Sal wrote on Sat, 23 December 2017 18:58
Question remains - how did you manage to write default "hello word" in C (?) without GCC ?
You cannot do it without GCC. Eclipse per se doesn't have a compiler. It's up to you to supply one. If you want to develop in Windows using CDT, install MSYS2 and MinGW GCC toolchain in it.
Re: Why do I have to jump through hoops to set up the CDT? [message #1779714 is a reply to message #1778486] Thu, 11 January 2018 15:04 Go to previous messageGo to next message
just humm is currently offline just hummFriend
Messages: 3
Registered: January 2018
Junior Member
@JJake Hyde

I'm completely new to both C++ and IDE's in general.

I recently installed Eclipse Oxygen and (seem to be) using Win-Builds 1.5 for the minGW compiler.

I still haven't figured out how to incorporate "using namespace std" without getting an error.

To get rid of the "Program "g++" not found in PATH" error, I have to manually add an Environment Variable (MINGW_HOME) with the compiler path. I'm not sure how to get eclipse to do this automatically.

And I've noticed that "Please open your Eclipse and from the menu Help -> Help Contents -> C/C++ Development User Guide, items Before you begin and Getting Started; and follow the instructions there." seems to be a popular response, but I've found the Help information to be lacking...from a beginner's standpoint, anyway...

https://preview.ibb.co/nuAHu6/Capture.jpg



Re: Why do I have to jump through hoops to set up the CDT? [message #1779723 is a reply to message #1779714] Thu, 11 January 2018 19:01 Go to previous message
Andrey Sotnikov is currently offline Andrey SotnikovFriend
Messages: 17
Registered: October 2014
Junior Member
For me it was enough to specify the path to the gcc executable in my PATH environment variable. Eclipse was able to figure out it's MinGW and retrieved automatically the paths to the MinGW system include header files. I used MinGW from here: http://www.msys2.org/. After installation of MSYS2 and all its updates, I issued 'pacman -S mingw-w64-x86_64-toolchain' from the MSYS command line and then added C:\msys64\mingw64\bin to the PATH environment variable.

[Updated on: Thu, 11 January 2018 19:02]

Report message to a moderator

Previous Topic:Error when using mingw toolchain
Next Topic: Symbol 'mkldnn_f32' could not be resolved
Goto Forum:
  


Current Time: Thu Jan 18 00:04:58 GMT 2018

Powered by FUDForum. Page generated in 0.02397 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software