2017-12-05 1 views
1

안녕하십니까. 나는 C++ 프로그램을 컴파일하기에는 너무 오래된 g ++ 버전을 가진 기계를 원격으로 사용하고있다. http://luiarthur.github.io/gccinstall을 사용하여 gcc-5.4.0을 설치했습니다. 코드는 준수하지만, 그것을 실행했을 때 다음과 같은 오류 얻을 : C++ 프로그램을 실행할 때 잘못된 경로가 검색되었습니다.

/usr/lib64/

잘못된 일입니다 검색됩니다

./run_with_config: /usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ./run_with_config) ./run_with_config: /usr/lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ./run_with_config) ./run_with_config: /usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.18' not found (required by ./run_with_config) ./run_with_config: /usr/lib64/libstdc++.so.6: version CXXABI_1.3.5' not found (required by ./run_with_config) ./run_with_config: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./run_with_config)

그래서 경로를. 올바른 경로가 검색된 경로가되도록 조정해야 할 부분이 무엇인지 확신 할 수 없습니다.

도움을 받으실 수 있습니다. -static-libstdc++ 플래그 (아마 당신은뿐만 아니라 -static-libgcc이 필요합니다)와

+0

관련 https://stackoverflow.com/questions/4250624/ld-library-path-vs-library-path – UKMonkey

답변

1

컴파일 - 바이너리 안에 새로운 런타임 라이브러리가 포함됩니다, 그래서 오래된 /usr/lib64/libstdc++.so.6 라이브러리는 사용되지 않습니다.

+0

대단히 감사합니다! – user110503

관련 문제