User forums > Using Code::Blocks

Environment variables

(1/2) > >>

markos:
Hello, everyone,

I am using the EnvVars plugin to try to set the PATH enviroment variable under Ubuntu, using Code::Blocks svn 8150.

Under the 'Environment variables' tab on 'Environment settings', I add the variable 'PATH' with the value 'test:$PATH'. In order to check it, I added a pre-build step in my project with the command 'echo $PATH'. When I compile my program, under the 'Build log' tab, I see "/usr/bin:/usr:test:/usr/local/sbin/...(other bin paths)".

I see it was set kind of correctly, but the paths '/usr/bin' and '/usr' were prepended to my options. Is there a way to change this behavior, I mean, not to prepend these paths?

Thanks,
Markos

Alpha:
What is the master path of your active compiler?  It, and master/bin, are (likely) added to the path by the Compiler plugin so that the compiler executables can be found.

markos:
That's it!

My compiler path is in /usr. I did a little test, changing it from /usr to /usr/bin, and the paths changed to '/usr/bin' and '/usr/bin/bin'.

Can I append these paths to the PATH environment variable, instead of prepend them?

Jenna:

--- Quote from: markos on December 08, 2012, 12:44:10 am ---That's it!

My compiler path is in /usr. I did a little test, changing it from /usr to /usr/bin, and the paths changed to '/usr/bin' and '/usr/bin/bin'.

Can I append these paths to the PATH environment variable, instead of prepend them?

--- End quote ---
No (at least not at the moment).
It's hardcoded this way, to make sure the correct compiler is used.
It would possibly work, if it would be possible to ensure EnvVar-plugin sets the path later than the compiler-plugin does.

markos:
Ok.

Actually, that's what I am trying to do, to change the compiler from the system compiler to another version that I've just built.

Thank you very much!

Navigation

[0] Message Index

[#] Next page

Go to full version