Code::Blocks Forums
User forums => Help => Topic started by: effemmeffe on August 31, 2012, 04:30:56 pm
-
I'd like to modify the windows global variable PATH on a per project basis.
So when I compile a project I can have a modified PATH variable.
I can't figure out how to do that, can someone help me, please?
TIA
-
I can't figure out how to do that, can someone help me, please?
Use the EnvVars plugin, it has per-project specific options.
-
Thanks.
I tried, but I can't get it work and I can't figure out what I'm doing wrong...
I have a windows machine and I'm trying to compile a GTK+ program.
My GTK+ is installed in c:\programmi\gtk+ and I'd like to add that path to the global path so I can use pkg-config to add the needed libraries for my project.
In C::B settings->environment->environment variables I set up a new envvar set called gtk in which I put the line:
PATH = %PATH%;c:\programmi\gtk+\bin
Then in the Envvars options of my project I select the set I just created.
To test I wrote a simple batch file containing just the command PATH and I run it as pre-build step in my project build option.
Now in the build log I have the output of the windows command PATH and I can't see the added path c:\programmi\gtk+\bin.
Where is my mistake?
-
Where is my mistake?
Enable the debug option in the envvar plugin, then run C::B with the "--debug-log" flag and see what happens for yourself in the debug log. I'll try myself once I find the time...
-
It worked!
To do what you suggested I had to close C::B and restart it via command line.
Once I restarted C::B I didn't have to change anything, I tried to recompile and now the PATH is correct.