[Scons-users] SCons is only installing .lib part of SharedLibrary on Windows when target is specified

Dan Pidcock dan.pidcock at googlemail.com
Fri Feb 1 11:28:54 EST 2013


On 1 February 2013 15:33, Gary Oberbrunner <garyo at oberbrunner.com> wrote:

>

> On Fri, Feb 1, 2013 at 10:24 AM, Dan Pidcock <dan.pidcock at googlemail.com>

> wrote:

>>

>> However, looking through the --taskmastertrace output did show that

>> the DLL wasn't even being considered when just the application was

>> being built, but the .lib was being considered.

>

>

> This is correct behavior -- you don't need the .dll to link the .exe. Your

> Install should pick up both, however, and I think it is.

> You're using Default(), which tells SCons what to build if you don't specify

> any targets on the cmd line. In your run 1, though, you do specify a target

> (your exe) -- so it builds only what's needed to build that target.

>

> Maybe what you want is Alias('all', ...) instead of Default(), and then say

> Default(Alias('all')) to build all by default?


I think I understand: Currently what I have tells SCons to install the
library when no target is specified, but when I specify a target I
still need to tell it to install the library?

How do I do the latter?

I tried:
Alias('all', sampleApplicationEnv.Install(binDir, sampleApplication))
Default(Alias('all'))
in the application SConscript
and:
Alias('all', sampleLibraryEnv.Install(binDir, sampleLibrary))
Default(Alias('all'))
in the library SConscript
but that also only installed the .lib and not the .dll
So I tried:
which I thought would tell SCons to always install both the app and
the library in the bin dir, but that also only installs the lib.

Dan


More information about the Scons-users mailing list