On Sep 20, 3:24 pm, g.vuko...@gmail.com wrote:
> I have a problem with my Makefile/library.
> My library "libmylib.so" includes the header file <boost/regex.hpp>.
> My Makefile uses following variables:
Note that how to invoke the compiler and the associated tools
(which is really what your question is about) is off topic here,
and you really should ask in a group dedicated to your toolset.
However...
[...
> BUT...
> when I build a binary which uses libmylib I have to enter:
> g++ libmylib-test.cc -lmylib -lboost_regex
> How can I avoid "-lboost_regex"? The binary only includes libmylib.
You have to arrange for your library to incorporate the
necessary object files (probably all of them) from the boost
library. How you do this depends very much on your platform;
with the Unix toolset, I think you have to extract the library
into a temporary directory, then add the files from that
directory to your library.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34