From e8304ae0b5d2b0640edbcd1449d985316e427654 Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Fri, 3 Jan 2025 05:14:18 -0700 Subject: [PATCH] Invert test library order The libraries on the left may know about and use libraries on the right. With the opposite order, potentially there can be unresolved symbols, as the library they should be found in has already been processed. --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index a0dade1d..7c9121fe 100644 --- a/makefile +++ b/makefile @@ -71,7 +71,7 @@ TESTOBJS := $(patsubst $(TESTDIR)/%.cpp,$(TESTINTDIR)/%.o,$(TESTSRCS)) TESTCPPFLAGS := $(CPPFLAGS) -I./ TESTLDFLAGS := $(LDFLAGS) -TESTLIBS := -lgtest -lgmock -lgmock_main -lpthread $(LDLIBS) +TESTLIBS := -lgmock_main -lgmock -lgtest -lpthread $(LDLIBS) TESTPROJECT_FLAGS = $(TESTCPPFLAGS) $(CXXFLAGS) TESTPROJECT_LINKFLAGS = $(TESTLDFLAGS) $(TESTLIBS)