For people finding trouble with Eclipse

A forum where anything goes. Introduce yourselves to other members of the forums, discuss how your name evolves when written out in the Game of Life, or just tell us how you found it. This is the forum for "non-academic" content.
Post Reply
User avatar
Rhombic
Posts: 1072
Joined: June 1st, 2013, 5:41 pm

For people finding trouble with Eclipse

Post by Rhombic » November 29th, 2017, 3:41 pm

I've been having a headache not with C but with the Eclipse IDE, and I think the way to solve these problems was not intuitive at all and the information on the internet was, at best, sparse and non-specific. I ended up changing preferences that had nothing to do with the actual issue, which was that Eclipse was not trying to use the Cygwin compiler. I think most people on these forums using Windows will probably have Cygwin for apgsearch etc (or a Linux simulator - I have both but it's unrelated). So in case this is useful, I'll just give some advice on how to get Eclipse to know that if it's using the make.exe from Cygwin, it's fine if it wants to use the libraries of Cygwin too.


Just thought I'd summarise the solutions to the pain in actually compiling the code automatically.
For programming in C in Eclipse and assuming you already have Cygwin.
First of all, you'll probably get PATH errors when trying to build. I attempted to include the path of the make file but DO NOT! It was the reddest of red herrings because it actually changed the error so it led me to think I was on the right track.

Instead... and most importantly, in Windows->Preferences->C/C++->New C/C++ Project Wizard
select Empty Project and then select Cygwin (under Toolchains, on the right). Then click on "Make toolchain(s) preferred".
This video was useful.

Remember to save before building, because the compiler will attempt to use the pre-saved file so if you've changed main, it will have effects. I think if you now "Build all..." it should work, and then you should be able to run it.
SoL : FreeElectronics : DeadlyEnemies : 6a-ite : Rule X3VI
what is “sesame oil”?

Post Reply