When I run my game, I get these errors:
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(InputSoundFile.cpp.obj):InputSoundFile.cpp|| undefined reference to `sf::FileInputStream::FileInputStream()'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(InputSoundFile.cpp.obj):InputSoundFile.cpp|| undefined reference to `sf::FileInputStream::open(std::string const&)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(InputSoundFile.cpp.obj):InputSoundFile.cpp|| undefined reference to `sf::MemoryInputStream::MemoryInputStream()'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(InputSoundFile.cpp.obj):InputSoundFile.cpp|| undefined reference to `sf::MemoryInputStream::open(void const*, unsigned int)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::MemoryInputStream::MemoryInputStream()'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::MemoryInputStream::open(void const*, unsigned int)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::MemoryInputStream::seek(long long)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::FileInputStream::FileInputStream()'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::FileInputStream::open(std::string const&)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::FileInputStream::seek(long long)'|
s Folder\CodeBlocks\SFML-2.4.2\lib\libsfml-audio-s.a(SoundFileFactory.cpp.obj):SoundFileFactory.cpp|| undefined reference to `sf::FileInputStream::~FileInputStream()'|
This is the code that causes this:
sf::SoundBuffer rifleShotBuffer;
if (!rifleShotBuffer.loadFromFile("Audio/RifleShot.wav")) {
return EXIT_FAILURE;
}
Can someone explain why this happens?