G
g.vukoman
Hi all!
I have a problem with my Makefile/library.
My library "libmylib.so" includes the header file <boost/regex.hpp>.
My Makefile uses following variables:
CC = gcc
CXX = g++
LD = g++
CCFLAGS =
CXXFLAGS =
LDFLAGS = -Wl,-soname,libsysinfo.so.1 -shared
CP = cp
LN = ln
MD = mkdir
RM = rm
..PHONY: clean
..PHONY: install
..PHONY: uninstall
[...]
A "make install" works great.
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.
So, how can I link libboost_regex into libmylib to avoid later
linking?
Thanks
Goran
I have a problem with my Makefile/library.
My library "libmylib.so" includes the header file <boost/regex.hpp>.
My Makefile uses following variables:
CC = gcc
CXX = g++
LD = g++
CCFLAGS =
CXXFLAGS =
LDFLAGS = -Wl,-soname,libsysinfo.so.1 -shared
CP = cp
LN = ln
MD = mkdir
RM = rm
..PHONY: clean
..PHONY: install
..PHONY: uninstall
[...]
A "make install" works great.
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.
So, how can I link libboost_regex into libmylib to avoid later
linking?
Thanks
Goran