Skip to content

Update Makefile to link with CXX#2

Open
zingdle wants to merge 1 commit into
evanj:masterfrom
zingdle:master
Open

Update Makefile to link with CXX#2
zingdle wants to merge 1 commit into
evanj:masterfrom
zingdle:master

Conversation

@zingdle

@zingdle zingdle commented Sep 27, 2020

Copy link
Copy Markdown

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
Copy Markdown

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