tpccbench
tpccbench copied to clipboard
Update Makefile to link with CXX
I'm using g++ 9.3, in addition to https://github.com/evanj/tpccbench/pull/1 I got:
g++ -g -MD -Werror -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -std=c++11 -c -o btree_test.o btree_test.cc
g++ -g -MD -Werror -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -std=c++11 -c -o stupidunit.o stupidunit.cc
cc -lstdc++ btree_test.o stupidunit.o -o btree_test
/usr/bin/ld: btree_test.o: in function `__static_initialization_and_destruction_0(int, int)':
/usr/include/c++/9/iostream:74: undefined reference to `std::ios_base::Init::Init()'
/usr/bin/ld: /usr/include/c++/9/iostream:74: undefined reference to `std::ios_base::Init::~Init()'
/usr/bin/ld: btree_test.o: in function `Test::~Test()':
/home/user/tpccbench/stupidunit.h:34: undefined reference to `operator delete(void*)'
/usr/bin/ld: btree_test.o: in function `BTreeTest::~BTreeTest()':
/home/user/tpccbench/btree_test.cc:13: undefined reference to `operator delete(void*)'
Fixed by linking with cxx, according to this answer.
Thank you.