I did write my SConstruct file so I build and run the program by doing scons run
program = env.Program('build/output', Glob('build/test/*.cpp'))
env.Default(program)
env.Alias('run', program, program[0].abspath)
I can compile my program and run it without problem, but when I try to use glut and opengl in my program, I have the following error:
/home/tran/workspace/bobail/build/test/test
freeglut (/home/tran/workspace/bobail/build/test/test): failed to open display ''
After some search I found out that my compiled program need the environment variable DISPLAY to be set to DISPLAY=:0
. I tried using Scons Export command but with no success so far.
Could somebody tell me how to do it.
EDIT: My program work fine if I execute it from command line instead of Scons environment.