From 65997677482af6162ab8f2b04c512f3abf0fb328 Mon Sep 17 00:00:00 2001 From: Amitai Schleier Date: Tue, 14 Aug 2018 00:22:38 +0100 Subject: [PATCH] With Google Test 1.8.0, I seem to need both libs. --- cpp/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/Makefile b/cpp/Makefile index 5ebc68d9..cc35de42 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -65,9 +65,8 @@ gtest.a : gtest-all.o gtest_main.a : gtest-all.o gtest_main.o $(AR) $(ARFLAGS) $@ $^ -# Builds a sample test. A test should link with either gtest.a or -# gtest_main.a, depending on whether it defines its own main() -# function. +# Builds a sample test. A test should link with gtest.a, and also +# gtest_main.a if it doesn't define its own main() function. GildedRose.o : $(USER_DIR)/GildedRose.cc $(CXX) -c $^ @@ -76,7 +75,7 @@ GildedRoseUnitTests.o : $(USER_DIR)/GildedRoseUnitTests.cc \ $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/GildedRoseUnitTests.cc -GildedRose : GildedRoseUnitTests.o GildedRose.o gtest_main.a +GildedRose : GildedRoseUnitTests.o GildedRose.o gtest.a gtest_main.a $(CXX) $(CPPFLAGS) $(CXXFLAGS) -pthread $^ -o $@ GildedRoseTextTests.o : $(USER_DIR)/GildedRoseTextTests.cc