USER_LDFLAGS and linking order

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++.

Rg,

Arnaud

no, the best in this case is to copy makefile.examples as Makefile in your project and do any modifications there. you end up with a custom makefile but it’s the only way right now. we could do some custom variables in config.make for library order but that probably will make the makefile too complex for most of the cases