c++ - SFML 2.3 and CodeBlocks error compilation -


i'm trying make sfml works codeblocks. did said in video tutorial : https://www.youtube.com/watch?v=gegwo8ug2by

everything works if add sfml/graphics.hpp, config isn't bad.
if try add sfml/audio.hpp (i need add sounds project) , write "sf::music background_music;" error :

    ||=== build: debug in jeudego (compiler: gnu gcc compiler) ===| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|52|undefined reference `sf::thread::~thread()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|70|undefined reference `sf::thread::wait()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|59|undefined reference `sf::thread::~thread()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|59|undefined reference `sf::thread::~thread()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|135|undefined reference `sf::thread::launch()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|166|undefined reference `sf::thread::wait()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundstream.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundstream.cpp|228|undefined reference `sf::thread::launch()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(inputsoundfile.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\inputsoundfile.cpp|74|undefined reference `sf::fileinputstream::fileinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(inputsoundfile.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\inputsoundfile.cpp|79|undefined reference `sf::fileinputstream::open(std::string const&)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(inputsoundfile.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\inputsoundfile.cpp|117|undefined reference `sf::memoryinputstream::memoryinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(inputsoundfile.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\inputsoundfile.cpp|122|undefined reference `sf::memoryinputstream::open(void const*, unsigned int)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|71|undefined reference `sf::fileinputstream::fileinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|72|undefined reference `sf::fileinputstream::open(std::string const&)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|78|undefined reference `sf::fileinputstream::seek(long long)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|84|undefined reference `sf::fileinputstream::~fileinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|84|undefined reference `sf::fileinputstream::~fileinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|95|undefined reference `sf::memoryinputstream::memoryinputstream()'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|96|undefined reference `sf::memoryinputstream::open(void const*, unsigned int)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\src\sfml\audio\soundfilefactory.cpp|101|undefined reference `sf::memoryinputstream::seek(long long)'| d:\info\sfml-2.3\lib\libsfml-audio-s-d.a(soundfilefactory.cpp.obj):d:\sfml-release\_sources\sfml\include\sfml\system\memoryinputstream.hpp|43|undefined reference `vtable sf::memoryinputstream'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_write'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_write'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_write'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_write'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_write'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references `oggpack_write' follow| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_readinit'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_readinit'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references `oggpack_read' follow| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_bytes'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_bytes'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_read'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references `oggpack_read' follow| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_writeinit'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_bytes'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_bytes'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_bytes'| d:\info\sfml-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference `oggpack_writeclear'| ||more errors follow not being shown.| ||edit max errors limit in compiler options...| ||=== build failed: 50 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===| 

my linked libraries (in order) :

sfml-graphics-s-d  sfml-window-s-d  sfml-system-s-d  sfml-audio-s-d  sfml-network-s-d  flac  ogg  vorbis  vorbisenc  vorbisfile  openal32 jpeg freetype ws2_32 gdi32 opengl32 winmm  

and #defines :

sfml_static unicode 

thanks help!

try reordering links. sfml system should last or first in linker settings. should last of sfml links.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -