From 4c012bd7067091fcd44012c8b85fb4519324d0f7 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Sun, 26 Jul 2020 08:49:25 -0400 Subject: Fluid: when linking include LDFLAGS order LDFLAGS often contains "-L*" flags as provided outside the build to tell the linker where to search for libraries. If these are included -before- the ones used for internal linkage as found in LINKSHARED, and FLTK is already installed on the system, then the already-installed FLTK libraries will be found before those internal to the build. Moving the LDFLAGS after LINKSHARED generally solves this issue. Worst case the move won't hurt linking since all of the flags are still included in the link command. --- fluid/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/Makefile b/fluid/Makefile index ff191601b..6c1469581 100644 --- a/fluid/Makefile +++ b/fluid/Makefile @@ -55,7 +55,7 @@ all: $(FLUID) fluid$(EXEEXT) fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME) \ $(IMGLIBNAME) echo Linking $@... - $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS) + $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDFLAGS) $(LDLIBS) $(OSX_ONLY) $(RM) -r -f fluid.app/Contents/MacOS $(OSX_ONLY) mkdir fluid.app/Contents/MacOS $(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS @@ -63,7 +63,7 @@ fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME) \ fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \ ../src/$(IMGDSONAME) echo Linking $@... - $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS) + $(CXX) $(ARCHFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDFLAGS) $(LDLIBS) clean: -$(RM) *.o core.* *~ *.bck *.bak -- cgit v1.2.3