User forums > Using Code::Blocks

Using EnvVar

<< < (2/2)

oBFusCATed:
Also a simple test project that reproduces the problem or at least the full build log.

ironhead:

--- Quote from: oBFusCATed on June 30, 2010, 09:32:23 pm ---Also a simple test project that reproduces the problem or at least the full build log.

--- End quote ---

Erm.... the build log doesn't show much (I have Compiler Logging set to 'Full Command Line') all I see is:


--- Code: ---Running project pre-build steps
--- End code ---

My pre-build step is:


--- Code: ---[[ local hgfile = _T("hgversion.h"); local hgcmd = _T("cmd /c hg summary | grep parent | sed -f hgversion.sed > hgversion.h"); if ( !IO.FileExists(hgfile) ) { IO.Execute(hgcmd); } ]]
--- End code ---

the problem is that grep and sed are in my MSYS directory, which I temporarily want to add to the PATH for this pre-build step.  If I add the MSYS path to the PATH prior to starting C::B, the command works fine.

ironhead:
I've managed to work around the issue by adding my MSYS path to the 'Additional Paths' tabs in 'Settings > Compiler and Debugger > Global Compiler Settings' under the 'Toolchain executables' tab.

Navigation

[0] Message Index

[*] Previous page

Go to full version