ECLIPSE (CDT) Mars.1 cannot generate a proper project environment PATH for MINGW or CYGWIN [message #1749988] |
Wed, 14 December 2016 18:54 |
GG CRAVER 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04471 seconds