[Scons-users] MSVC linker always relink with shared library?

Daniel Moody dmoody256 at gmail.com
Tue Aug 14 00:59:05 EDT 2018


Anyone else seeing this with latest release (3.0.1)? It doesn't re-link
with Program when building an executable.

Here is my SConstruct:

env = Environment()
env.SharedLibrary('test', 'test1.c')

Here is test1.c:

int foo(){ return 0; }

When I run this the first time this is my output:

C:\Users\Daniel\workspace>scons -f SConstruct.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cl /Fotest1.obj /c test1.c /nologo
test1.c
link /nologo /dll /out:test.dll /implib:test.lib test1.obj
scons: done building targets.

If I run the same command again without changing anything, I get the link
again:

C:\Users\Daniel\workspace>scons -f SConstruct.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /dll /out:test.dll /implib:test.lib test1.obj
scons: done building targets.

Subsequent runs of the command produce the link again.

I have Visual Studio 2015 installed.

Scons and Python:
C:\Users\Daniel\workspace>scons -v
SCons by Steven Knight et al.:
        script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14
13:16:53, by bdbaddog on hpmicrodog
        engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14
13:16:53, by bdbaddog on hpmicrodog
        engine path:
['c:\\python36\\lib\\site-packages\\scons-3.0.1\\SCons']
Copyright (c) 2001 - 2017 The SCons Foundation

C:\Users\Daniel\workspace>python --version
Python 3.6.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180814/231c4a17/attachment.html>


More information about the Scons-users mailing list