User forums > Using Code::Blocks
Environment variable doesn't work with Scons
a71128:
Hey guys,
I am trying to import my scons project into CB. However, I can't seem to set environment variables correctly because my scons script always shows variables missing.
Does anyone have experience with this? I would appreciate any input.
Thanks!
Best,
a71128
BlueHazzard:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
a71128:
I am running Code::Blocks version 16.01 on Ubuntu 14.04.
The compiler I use is GNU GCC version 4.8.4.
When I try to build my code with custom scons setup.
It shows
--- Code: ---Error : environment variable DIR/CONFIG_DIR is not defined
Please thoroughly read the file: README
found at the root level of the Ottomatika directory and follow
all of the instructions listed there.
The short fix is to add to your .bashrc file the line:
export DIR=YOURPATH/ottomatika/codebase
export CONFIG_DIR=$OTTO_DIR/config
--- End code ---
from the SConscript.
I have already tried exporting the variable in the pre-build steps, defining custom variables, and setting global variable but none of them work.
Thanks!
oBFusCATed:
What are you really trying to do?
Create a custom makefile project that executes scons for building?
Have you tried the env var plugin (http://wiki.codeblocks.org/index.php/Environment_Variables_plugin)?
a71128:
--- Quote from: oBFusCATed on July 31, 2017, 08:23:48 pm ---What are you really trying to do?
Create a custom makefile project that executes scons for building?
Have you tried the env var plugin (http://wiki.codeblocks.org/index.php/Environment_Variables_plugin)?
--- End quote ---
Yes, that is exactly what I would like to achieve.
I wanted to try the env var plugin. However, I couldn't find the link to the install file.
Navigation
[0] Message Index
[#] Next page
Go to full version