[Scons-users] SConscripts getting read but not run

William Blevins wblevins001 at gmail.com
Wed Jun 3 12:54:57 EDT 2015


Normally I would say that your question is answered in
http://www.scons.org/wiki/FrequentlyAskedQuestions but the wiki is down due
to DOS Attacks probably.

Here is a list to a previous mailing list discussion which will probably
answer your question:
http://thread.gmane.org/gmane.comp.programming.tools.scons.user/26756

V/R,
William

On Wed, Jun 3, 2015 at 12:02 PM, Javier Llopis <javier at correo.com> wrote:

>
> 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
> |      +- <several .c and .h files>
> |
> +--- l2
>        +- SConscript
>        +- <more .c and .h files>
>
> 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("lib\lib1", src, CPPPATH="include")
>
> l2/SConscript:
>
> src = Glob("*.c")
> StaticLibrary("lib2", src)
>
> Output of scons:
>
> C:\Users\j\t\ap>scons
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> cl /Fomain.obj /c main.c /nologo /IC:\Users\j\t\l1\include
> /IC:\Users\j\t\l2
> 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
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150603/02c3e03c/attachment.html>


More information about the Scons-users mailing list