[Scons-users] Changes in linker options don't rebuild SharedLibrary

Jason Swager jswager at alohaoi.com
Mon Dec 16 16:50:15 EST 2013


Hello,
I've encountered what seems to be a rather serious problem in SCONS
linking. I'm hoping that I'm just doing something stupid or misconfigured
something, but something seems wrong. What I'm finding is that changing
the linking options won't cause a rebuild of a shared library if it has
already been built. Here are the details of the my situation...

SCons 2.3. Visual Studio 2010. Windows 7 64bit machine.

The DLL I'm compiling is REAL simple (SomeDLL.cpp):

int hello()
{
return 0;
}

The SConstruct is also very simple:

env=Environment(tools=['default'], MSVC_VERSION='10.0', TARGET_ARCH =
'x86', no_import_lib='1')
env.AppendUnique(SHLINKFLAGS=['/FORCE']) #
env.SharedLibrary(target='SomeDLL.dll', source=['SomeDLL.cpp'])

Running this once, the DLL gets built. Run it a second time, nothing gets
built because nothing has changed. If I comment out the second line (the
SHLINKFLAGS modification), then run "scons" again, nothing gets rebuilt.
Adding/removing that line should have caused a relink.

I also tried changing LINKFLAGS and even LIBS, but modifications to those
construction variables didn't cause a relink.

Just for reference, changes to compilation flags CXXFLAGS, CPPPATH, CCFLAGS
would cause a rebuild of the CPP file, resulting in a relink of the DLL.
But changes to the linker options seem to be ignored.

Am I doing something wrong?
Thanks,
Jason Swager
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131216/092521a7/attachment.html


More information about the Scons-users mailing list