[Scons-users] SConscripts getting read but not run

Javier Llopis javier at correo.com
Wed Jun 3 12:02:26 EDT 2015


Hello,

I'm a scons newbie, and I realise this may have been asked before although I have done quite a bit of -so far- fruitless searching.

I have the following directory structure for an app that depends on two libraries.

root
|
+--- app
|      +- SConstruct
|      +-  main.c
|
+--- l1
|      +- SConscript
|      +- 
|
+--- l2
       +- SConscript
       +- 
My problem is that the SConscript files are being read but not executed.

app/SConstruct:

SConscript(dirs=["../l1", "../l2"])
Program("main", "main.c", 
         CPPPATH=["../l1/include", "../l2"], 
         LIBS=["../l1/lib/lib1", "../l2/lib2"]) 
l1/SConscript:

src = Glob("src/*.c")
StaticLibrary("liblib1", src, CPPPATH="include")         

l2/SConscript:

src = Glob("*.c")
StaticLibrary("lib2", src)

Output of scons:

C:Usersjtap>scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cl /Fomain.obj /c main.c /nologo /IC:Usersjtl1include /IC:Usersjtl2
main.c
link /nologo /OUT:main.exe ../l1/lib/lib1.lib ../l2/lib2.lib main.obj
LINK : fatal error LNK1181: cannot open input file '../l1/lib/lib1.lib'
scons: *** [main.exe] Error 1181
scons: building terminated because of errors.

The Link error happens because ../l1/lib/lib1.lib wasn't built in the first place. 

Any ideas?

Thanks

Javier Llopis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150603/1bc9de3d/attachment.html>


More information about the Scons-users mailing list