2013-05-13 8 views
0

학교 프로젝트를 위해 debian에 SFML1.6을 설치했습니다.오류 컴파일 SFML debian

컴파일에

내가 논문의 오류가 있습니다

그램 ++ -c MAIN.CPP

g ++ main.o를 -o Bomberman에 -lsfml 그래픽

/usr/지방/lib 디렉토리/libsfml을 -graphics.so : sf::Unicode::Text::Text()' /usr/local/lib/libsfml-graphics.so: undefined reference to SF :: 문맥 :: GetGlobal() '으로 정의 /usr/local/lib/libsfml-graphics.so 참조 : sf::Window::OnEvent(sf::Event const&)' /usr/local/lib/libsfml-graphics.so: undefined reference to : SF : 윈도우 생성 (SF : 비디오 모드로 정의 기준, std :: basic_string, std :: allocator> const &, 부호없는 long, sf :: WindowSettings의 CONST &) 정의 기준에 sf::Window::Create(unsigned long, sf::WindowSettings const&)' /usr/local/lib/libsfml-graphics.so: undefined reference to SF : /usr/local/lib/libsfml-graphics.so ' /usr/local/lib/libsfml-graphics.so 정의 참조 SF :: 윈도우에 소속 카테고리 sf::Context::SetActive(bool)' /usr/local/lib/libsfml-graphics.so: undefined reference to' : 창 :: GetHeight() CONST " /usr/local/lib/libsfml-graphics.so : sf::Window::Window()' /usr/local/lib/libsfml-graphics.so: undefined reference to SF : 유니 :: :: 텍스트 문자 (부호의 INT CONST *)을 참조하여 정의 ' /usr/지방/lib/libsfml-graphics.so : 정의되지 않은 참조 sf::Window::~Window()' /usr/local/lib/libsfml-graphics.so: undefined reference to sf :: Context :: IsContextActive() ' /usr/local/lib/libsfml-graphics.so : 정의되지 않은 참조 sf::Window::SetActive(bool) const' /usr/local/lib/libsfml-graphics.so: undefined reference to sf :: Unicode :: Text :: operator 표준 : basic_string, 표준 : 할당> CONST &() CONST " /usr/local/lib/libsfml-graphics.so : SF '로 정의 참조 : : 창 :: GetWidth() const를 ' collect2 : * [모든] 오류 1

오류가 나오는 논제 왜 이해가 안 : 신분증 1 개 종료 상태를 메이크업을 반환했습니다. libsfml- *는/usr/lib /에 있으며 필요한 모든 내용은/usr/include에 포함됩니다.

답변

1

sfml의 창과 시스템 라이브러리에도 링크해야합니다.

g++ main.o -o bomberman -lsfml-graphics -lsfml-window -lsfml-system 

당신은 또한

+1

this tutorial를 읽고 마지막 버전을 사용하는 것이 좋습니다, 그 대신 오래된, 버그 및 사용되지 않는 버전 1.6, 2.0이다. – Hiura

+0

답장을 보내 주셔서 감사합니다. Sfml 설치로 인해 문제가 발생했습니다. 내 잘못이야. – battlestar