Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » ECLIPSE (CDT) Mars.1 cannot generate a proper project environment PATH for MINGW or CYGWIN(corrupted project environment PATH)
ECLIPSE (CDT) Mars.1 cannot generate a proper project environment PATH for MINGW or CYGWIN [message #1749988] Wed, 14 December 2016 18:54 Go to next message
GG CRAVER is currently offline GG CRAVERFriend
Messages: 2
Registered: December 2016
Junior Member
I'm running Eclipse Version: Mars.1 Release (4.5.1) with projects using MINGW or CYGWIN. I'm running this setup on two different machines. The first machine as no problems. The second has the following issues:

issue#1:
Eclipse appends ";;C:\Program Files\eclipse" at the end of the Windows path it is generated from when selecting MINGW or CYGWIN as a tool chain. The ";;" is causing GDB not to be found in both cases.
If I manually replace ";;" by ";", Eclipse is then able to find GDB both for MINGW and CYGWIN, but GDB crashes immediately under MINGW (and works fine under CYGWIN)

Issue#2:
When generating the project path under CYGWIN, Eclipse also prefixes the Windows path with "${CYGWIN_HOME}\bin;C:/Program Files/Java/jre1.8.0_111/bin/server;C:/Program Files/Java/jre1.8.0_111/bin;C:/Program Files/Java/jre1.8.0_111/lib/amd64;"

when I compile and run this code in Eclipse.
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;

int main(int argc, const char **argv)
{
   char * p = getenv("PATH");
   if(p)
      cout << "The PATH is : " << p << endl;
   else
      cout << "The PATH is UNKNOWN." << endl;
   return 0;
}


The output I have on the working machine is:
The PATH is : /cygdrive/c/cygwin64/bin:/cygdrive/c/Program Files/Java/jre1.8.0_111/bin/server:/cygdrive/c/Program Files/Java/jre1.8.0_111/bin:/cygdrive/c/Program Files/Java/jre1.8.0_111/lib/amd64
:/cygdrive/c/Program Files/PostgreSQL/9.5/bin...

The output I have on the faulty machine is:
The PATH is : /cygdrive/c/Program Files/Java/jre1.8.0_111/bin/server:/cygdrive/c/Program Files/Java/jre1.8.0_111/bin:/cygdrive/c/Program Files/Java/jre1.8.0_111/lib/amd64:/cygdrive/c/ProgramData/Oracle/Java/javapath...

This shows that the "${CYGWIN_HOME}\bin" element of the project environment is not part of the actual generated path, and I cannot really make sense of it because Eclipse is still able compile the project fine on the faulty machine. (it is able to find Make, gcc and all the UNIX tools it needs...) I observed the same behavior with MINGW.

As far as I can tell the Eclipse setups are identical on both machines.

[Updated on: Thu, 15 December 2016 14:41]

Report message to a moderator

Re: ECLIPSE (CDT) Mars.1 cannot generate a proper project environment PATH for MINGW or CYGWIN [message #1750074 is a reply to message #1749988] Thu, 15 December 2016 18:22 Go to previous message
GG CRAVER is currently offline GG CRAVERFriend
Messages: 2
Registered: December 2016
Junior Member
It looks like the issues I experienced are closely related to this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389823
Previous Topic:Launching executable from Eclipse vs Command Line
Next Topic:Default constructor & faulty warning
Goto Forum:
  


Current Time: Tue Mar 19 08:09:32 GMT 2024

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

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

Back to the top