Skip to content

Conversation

@zingdle
Copy link

@zingdle zingdle commented Sep 27, 2020

I'm using g++ 9.3, in addition to #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.

@alannair
Copy link

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants