[Scons-users] Changes in linker options don't rebuild SharedLibrary
fbolduc at gmail.com
Tue Dec 17 08:48:49 EST 2013
It should re-link.
I've never used the no_import_lib bit, though. And your example does not
have any exported symbols. Maybe there is interference between these two
My suggestion is to try exporting a symbol (declspec dllexport) and
removing the no_import_lib bit.
Francis Bolduc, B.Sc.
On Mon, Dec 16, 2013 at 4:50 PM, Jason Swager <jswager at alohaoi.com> wrote:
> 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?
> Jason Swager
> Scons-users mailing list
> Scons-users at scons.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scons-users