[Scons-users] Shared library in bin subdirectory

LRN lrn1986 at gmail.com
Sat Dec 29 04:10:51 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29.12.2012 5:47, William Deegan wrote:

> On Dec 28, 2012, at 4:05 PM, LRN wrote:

>> On 28.12.2012 20:31, William Deegan wrote:

>>> On 12/28/2012 12:04 AM, LRN wrote:

>>>> On 28.12.2012 11:32, William Deegan wrote:

>>>>> , or you could just tell SCons to install the .dll from

>>>>> the target dir of the SharedLibrary() to /bin and the

>>>>> .dll.a to /lib as such:

>>>>>

>>>>> foo = env.SharedLibrary (target = "foo", source =

>>>>> ["foo.c"], SHLIBPREFIX = 'lib', LIBSUFFIX='.dll.a')

>>>>> env.Install('/bin','libfoo.dll')

>>>>> env.Install('/lib','libfoo.dll.a')

>>>>>

>>>>> SCons will then connect the dots. (change the second

>>>>> arguments of the installs to match the directory you're

>>>>> building them into via your SharedLibrary().

>>>> ...and for that i need to somehow know where the builddir

>>>> is, and where the .dll and .dll.a files end up, and how they

>>>> are named. Ok, the naming part should be obvious, since i did

>>>> provide prefix and suffix. But the rest is not so obvious.

>>> Not sure why it's not obvious what the build dir is. You

>>> specify it in the first argument of the builder...

>> Wait, the builder - that's the SharedLibrary() function, right?

>> Its first argument is name of the target (in this case - name of

>> the library). Not the build directory.

>

> The default build directory is the same directory as the

> SConscript/SConstruct, are you using VariantDir()?

No, i don't, but i will; OOTSD builds are THE standard (preferably -
OOTSD with the builddir being located outside of the source tree).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJQ3rOaAAoJEOs4Jb6SI2CwhmwIAJ5O7vSI8oj9xFrkXjLc7C6x
BK+t10d76ypPDg29V4l0qYsB2N7saTHJX/kTXs8/hvQbntrVo4hVSt8YXNjVBf8v
3/ZhGXuezsJro6KnBrGjdknM1Bgiw3+cn0FQVmvaRQTqDhHpyf9GRzdxU/jtXElE
gTki/cGl+VJwBlwh32/GeoVo5aTGA6IfwAhigwCjwNrkU+o1J0Ndm0sL7H9Vyky6
W7vHffijwaMd0wMxeuAJoA4+sTg9U2JZ88vb0YCmPlEU68oJzp4KHxdHnBF1/9I7
oDbHgnNdkDKLQvAbW4e1OsO+nhP4FfD1Y7ZWCjS8Rj88ZGjjal80Precdq0T0AI=
=a1/v
-----END PGP SIGNATURE-----


More information about the Scons-users mailing list