www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Newbie prolem building with SCons


I found that SCons now supports D, but when I tried to build a 
helloworld program, error occurred: "undefined reference to 

It seemed that adding -lrt after -lphobos2 would do the job, so I 
tried to add this in SConstruct:

   env = Environment()
   env.Append(LIBS = 'rt')

But when it build and links, I got this line

   gcc -o hello -m32 hello.o -L/usr/lib -lrt -lphobos2 -lpthread 

-lrt was not Appended to the right, but went before -lphobos2, 
which did not solve the problem.

So my question is, what can I do to tell Scons to run this 

   gcc -o hello -m32 hello.o -L/usr/lib  -lphobos2 -lpthread -lm 

Or is -lrt not the solution?
Mar 24 2012