c - How to link libtool convenience libraries? -
i using 3 libtool convenience libraries build binary several convenience libraries. let's convenience libs src/foo/libfoo.la
, src/bar/libbar.la
(just 2 now) , put in src/program
.
these 2 binaries have shared objects belongs either of them, have undefined references objects of each others if tries make shared or static lib using them. though can tell gcc these 2 not real static libraries, bunch of object files. can link them successfully:
gcc program.o -o program \ -wl,--start-group foo/libfoo.a bar/libbar.a -wl,--end-group
though using libtool have no control on linkage , can't add -wl,--start-group
, -wl,--end-group
flags. tried several hacks in makefile.am:
ldadd = \ -wl,--start-group foo/libfoo.la bar/libbar.la -wl,--end-group \ -lpthread
but it's (obviously) not working. so... how can tell libtool link object file collections (not static libraries) together, final binary?
Comments
Post a Comment