Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link error with gcc 6.1.1/ld 2.26.0 #88

Open
qualiaa opened this issue May 7, 2016 · 1 comment
Open

Link error with gcc 6.1.1/ld 2.26.0 #88

qualiaa opened this issue May 7, 2016 · 1 comment
Labels

Comments

@qualiaa
Copy link
Member

qualiaa commented May 7, 2016

On building a minimal test game,

cd test_game/build
CXX=gcc cmake -G Ninja ..
ninja

get output

FAILED: test_game 
: && /usr/bin/gcc   -std=c++14 -Wall -Werror   src/CMakeFiles/temp_game.dir/main.cpp.o  -o temp_game  -rdynamic tank/libtank.a -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio -lpthread && :
/usr/bin/ld: tank/libtank.a(Logger.cpp.o): undefined reference to symbol '_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@@GLIBCXX_3.4.21'
/usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

From the error, it appears to have something to do with the use of iostream in Logger

@qualiaa qualiaa added the bug label May 7, 2016
@DavidTruby
Copy link

I actually suspect that this is to do with the ABI change to std::string in gcc 6.1, have you rebuilt SFML since switching to 6.1? If not you need to rebuild it (in C++14 mode which is now the default) to make their std::string use the same ABI, and also make sure you're doing a completely clean build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants