[Scons-users] Problem with DLL dependencies on Windows
Dirk Bächle
tshortik at gmx.de
Fri May 24 03:15:07 EDT 2013
Hi Dmitry,
On 24.05.2013 06:18, Dmitry Mikhin wrote:
> Hello everyone,
>
> I discovered an apparent issue with building shared libraries under
> MinGW toolchain. Want to check if it's my own error or a general
> problem. The behavior is the same under SCons versions 2.2 and 2.3. A
> small test project demonstrating the problem is attached. All works
> without issues on Linux.
>
> [...]
>
> It almost works, apart from the problem of DLL on Windows. We build
> all libraries as shared, resulting in *.a and *.dll files. Only the
> *.a half makes it into build/libs on demand.
this sounds a bit as if the Emitter of the MinGW toolchain doesn't add
both file suffixes (*.a, *.dll) to the list of targets.
Are you creating the shared libs by specifying their full name:
t = env.SharedLibrary('libfoo.a', Glob('*.cpp'))
? Then try with only the "foo" part,
t = env.SharedLibrary('foo', Glob('*.cpp'))
. Also make sure that you haven't set the "no_import_lib" flag to '1' or
'True' in your environment.
The *.a file and the *.dll file should both appear in the list of
targets for your DLL. You can test this by printing them to stdout:
t = env.SharedLibrary(...)
print "My targets:", map(str, t)
Hope this helps.
Best regards,
Dirk
More information about the Scons-users
mailing list