Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

PATH problem on windows with CB rev 4170

(1/2) > >>

tiwag:
on windows platform the PATH environment variable is set to

--- Quote ---.;$PATH
--- End quote ---

$PATH doesn't get expanded

the following program


--- Code: ---#include <windows.h>
#include <stdio.h>

int main(void) {

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

  return 0;
}

--- End code ---


run with CB 4172 returns

--- Quote ---.;$PATH
Process returned 0 (0x0)   execution time : 0.015 s
Press any key to continue.
--- End quote ---

 8)

mandrav:
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.

tiwag:
sorry but it doesn't

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

--- End quote ---

but the original setting is still lost

tiwag:
it works fine with the following patch


--- Code: ---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);
  }

--- End code ---

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

brgds tiwag

mandrav:
Thanks tiwag.

Navigation

[0] Message Index

[#] Next page

Go to full version