News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

PATH problem on windows with CB rev 4170

Started by tiwag, June 25, 2007, 06:34:22 PM

Previous topic - Next topic

tiwag

on windows platform the PATH environment variable is set to
Quote.;$PATH

$PATH doesn't get expanded

the following program

#include <windows.h>
#include <stdio.h>

int main(void) {

  printf("%s",getenv("path"));

  return 0;
}



run with CB 4172 returns
Quote.;$PATH
Process returned 0 (0x0)   execution time : 0.015 s
Press any key to continue.

8)

mandrav

#1
Thanks for pointing this out. Fixing it now...

Although I can't test the fix atm, I 've committed it and it should work again now.
Be patient!
This bug will be fixed soon...

tiwag

sorry but it doesn't

now the path variable is set to
Quote.;%PATH%

but the original setting is still lost

tiwag

it works fine with the following patch

Index: compilergcc.cpp
===================================================================
--- compilergcc.cpp (revision 4175)
+++ compilergcc.cpp (working copy)
@@ -96,13 +96,10 @@

#if defined(__APPLE__) && defined(__MACH__)
     #define LIBRARY_ENVVAR _T("DYLD_LIBRARY_PATH")
-    #define LIBRARY_ENVVAR_DOLLAR _T("$") LIBRARY_ENVVAR
#elif !defined(__WXMSW__)
     #define LIBRARY_ENVVAR _T("LD_LIBRARY_PATH")
-    #define LIBRARY_ENVVAR_DOLLAR _T("$") LIBRARY_ENVVAR
#else
     #define LIBRARY_ENVVAR _T("PATH")
-    #define LIBRARY_ENVVAR_DOLLAR _T("%") LIBRARY_ENVVAR _T("%")
#endif

namespace
@@ -1188,7 +1185,7 @@
newLibPath << GetStringFromArray(compiler->GetLinkerSearchDirs(cmd->target), libPathSep);
if (newLibPath.SubString(newLibPath.Length() - 1, 1) != libPathSep)
newLibPath << libPathSep;
- newLibPath << LIBRARY_ENVVAR_DOLLAR;
+ newLibPath << oldLibPath;
wxSetEnv(LIBRARY_ENVVAR, newLibPath);
// LogMessage(_T("LIBRARY_ENVVAR=") + newLibPath, cltInfo);
}


and i guess it will work fine in linux and mac too,
but i can test it only on windows atm.

brgds tiwag

mandrav

Be patient!
This bug will be fixed soon...

tiwag

as usual M$ windoze needs extra treatment for pathes with spaces  :(

fixed in rev 4184