Boost logo

Boost-Build :

From: Andre Hentz (ahentz_at_[hidden])
Date: 2004-02-25 19:06:01


Hi,

I need to have some DLL created with custom extensions and I am getting
warnings when I do that by deriving a type from SHARED_LIB. I'm
attaching a test case that reproduces the conditions under which the
problem occurs. In summary, this is the library dependencies that I have:
lib.mydll depends on baselib.a, which depends on libm.so

baselib's Jamfile is like this:

project baselib ;
lib libm : : <name>m <link>shared ;
lib baselib : a.cpp ;

lib's Jamfile is like this:
import type ;
type.register MY_LIB : : SHARED_LIB : main ;
type.set-generated-target-suffix MY_LIB : : mydll ;

my-lib a : a.cpp /baselib ;
# this works ---> lib a: a.cpp /baselib ;

Am I doing this in the wrong way?

Best,

Andre Hentz
 --------------020503000207060300030106 Content-Type: text/plain;
name="xxx.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="xxx.py"

#!/usr/bin/python
from BoostBuild import Tester

t = Tester()

t.write("project-root.jam", "")
t.write("Jamfile.jam", """
project main ;
use-project /baselib : baselib ;
build-project lib ;
""")

t.write("baselib/Jamfile", """
project baselib ;
lib libm : : <name>m <link>shared ;
lib baselib : a.cpp ;
""")

t.write("baselib/a.cpp", """
int foo() {
return 0;
}
""")

t.write("lib/Jamfile", """
import type ;
type.register MY_LIB : : SHARED_LIB : main ;
type.set-generated-target-suffix MY_LIB : : mydll ;

my-lib lib : a.cpp /baselib ;
""")
# uncomment next line to see it pass
#t.write("lib/Jamfile", "lib lib : a.cpp /baselib ;")
t.write("lib/a.cpp", """
int main() {
return 0;
}
""")

from string import find
t.run_build_system()
t.fail_test(find(t.stdout(), "warning: Unused source") != -1)

t.cleanup()
 --------------020503000207060300030106--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk