본문 바로가기

IT

Dev-C++로 SFML라이브러리를 사용하기 위한 설정

Youtube에서

Let's make 16 games in C++: Snake


를 보고 SFML (Simple and Fast Multimedia Library)를 알게되었습니다.

튜토리얼을 따라해봤습니다.

-------------------------------------

1. SFML을 다운로드해서 압축해제

2. Dev-C++의 Tools -> Compiler Options -> Directories의

Libraries와 C++ Include를 압축해제한 폴더안의 각 경로로 설정

-------------------------------------

설정을 하고 실행하니 작동안하네요. ㅜㅜ

조사해보니 추가설정이 필요했습니다.

-------------------------------------

3. Dev-C++의 Tools -> Compiler Options -> General의

Add the following commands when calling the linker 를

-static-libgcc -DSFML_STATIC -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio

로 갱신

4. 압축해제한 폴더안의 bin폴더내의 dll파일을 EXE파일의 경로에 복사

-------------------------------------

샘플이 작동했습니다!

반응형