User forums > Using Code::Blocks

"Source" my environment

(1/1)

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

JGM:
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!

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

MortenMacFly:

--- Quote from: jens on February 08, 2008, 02:53:10 pm ---I never used this functionality, but if I understand the dialog right it should also work.

--- End quote ---
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. ;-)

anothrguitarist:
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

Navigation

[0] Message Index

Go to full version