Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: anothrguitarist on February 08, 2008, 07:49:00 am
-
Platform: Ubuntu 7.10
I'd like to start using code::blocks as my IDE, but there is something I need to figure out. Apparently, I need to "source" my environment in order to build certain programs. I am able to build the programs with a make file, however, if I enter the following command in terminal:
$. environ.sh
Unfortunately, I don't know how to setup code::blocks to run this command before it builds my programs. Does anyone know how I could do this? Any help would be appreciated.
-
A guitarist! Same as me :)
You could try by going to Project -> Build Options -> Pre/post build steps.
There you can execute commands.
Good Luck!
-
What about setting the variables in "Settings -> Environment settings -> Environment variables" ?
In the projects properties dialog you can chose which envvars-set you want to be used for the actual project.
I never used this functionality, but if I understand the dialog right it should also work.
-
I never used this functionality, but if I understand the dialog right it should also work.
Right - this is what I would propose to try, too. Although this requires you to setup the envvars you setup via script within the envvars plugin of C::B, too. but you could possibly get rid of the shell scripts then. ;-)
-
Thanks for the input, but I figured out how to do it last night, after a few days of hard work. What I had to do was run open terminal and source my environment, and then run code::blocks from the same console window.
I.E.
$. /directoryhere/environ.sh
$codeblocks
Thanks and regards