Author Topic: "Source" my environment  (Read 3017 times)

Offline anothrguitarist

  • Single posting newcomer
  • *
  • Posts: 3
"Source" my environment
« 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.


Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: "Source" my environment
« Reply #1 on: February 08, 2008, 02:16:40 pm »
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!

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: "Source" my environment
« Reply #2 on: February 08, 2008, 02:53:10 pm »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: "Source" my environment
« Reply #3 on: February 08, 2008, 08:54:22 pm »
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. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline anothrguitarist

  • Single posting newcomer
  • *
  • Posts: 3
Re: "Source" my environment
« Reply #4 on: February 09, 2008, 02:25:03 am »
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