How could I simplify the code to get libs out of LDFLAGS
or vice versa automatically in the following python/scons code?
if sys.platform[:5] == 'linux':
env.Append (CPPFLAGS = '-D__LINUX')
env.Append (LDFLAGS = '-lglut -lGLU -lGL -lm')
env.Append(CPPPATH=['include', 'incl
John wrote:
> How could I simplify the code to get libs out of LDFLAGS
> or vice versa automatically in the following python/scons code?
>
> if sys.platform[:5] == 'linux':
> env.Append (CPPFLAGS = '-D__LINUX')
> env.Append (LDFLAGS = '-lglut -lGLU -lGL -lm')
> env.Append(CPPPAT
John a écrit :
> How could I simplify the code to get libs out of LDFLAGS
> or vice versa automatically in the following python/scons code?
>
> if sys.platform[:5] == 'linux':
> env.Append (CPPFLAGS = '-D__LINUX')
> env.Append (LDFLAGS = '-lglut -lGLU -lGL -lm')
> env.Append(CPP
Thanks for your replies...
Solved my problem.
--j
Christophe wrote:
> John a écrit :
> > How could I simplify the code to get libs out of LDFLAGS
> > or vice versa automatically in the following python/scons code?
> >
> > if sys.platform[:5] == 'linux':
> > env.Append (CPPFLAGS = '-D__LINUX')
John a écrit :
> Thanks for your replies...
> Solved my problem.
Even so, I made a big mistake here. The Split function is of no use
because there is already a list of flags. Better do it like that :
libs = Split('glut GLU GL m')
env.Append (LIBS = libs)
BTW, Split is a scons function.
> Christ
But ur previous solution worked on my machine...
although a friend tried it on his machine and the libraries
were not found even if they existed! (Even the -lm was not found)
Can you explain a bit why the previous solution worked?
Thanks for ur help,
--j
--
http://mail.python.org/mailman/listi