Anybody any advice on a situation where a static library depends on some other dynamic library?
I’m nitting a Mongo addon for openframeworks however the C++ driver for Mongo depends on Boost. I’m adding the linker flags to USER_LDFLAGS in config.make however the Makefile includes them too early. Since the static library is included in the link command after $(USER_LDFLAGS). Moving the USER_LDFLAG later in the line solves this but creates a custom makefile.
(line 240 in makefile.examples)
$(CXX) -o $@ $(OBJS) $(ADDONS_OBJS) $(USER_OBJS) $(LDFLAGS) $(TARGET_LIBS) $(ADDONSLIBS) $(USER_LIBS) $(LIB_STATIC) $(USER_LDFLAGS) $(LIB_PATHS_FLAGS) $(LIB_SHARED) $(SYSTEMLIBS)
I’ve read about --start-group archives --end-group options of ld but it doesn’t seem to be supported by g++.