0 Membres et 4 Invités sur ce sujet
#include <SFML/Graphics.hpp>#include <SFML/Audio.hpp> int main() {sf::SoundBuffer buffer; buffer.LoadFromFile("1023"); sf::Sound sound; sound.setBuffer(buffer); sound.play(); }
loadFromFile (sans majuscule, comme tout le reste).
||=== Build: Debug in lopetru (compiler: GNU GCC Compiler) ===|obj\Debug\main.o||In function `main':|F:\CodeBlocks\lopetru\main.cpp|8|undefined reference to `_imp___ZN2sf11SoundBufferC1Ev'|F:\CodeBlocks\lopetru\main.cpp|42|undefined reference to `_imp___ZN2sf11SoundBuffer12loadFromFileERKSs'|F:\CodeBlocks\lopetru\main.cpp|44|undefined reference to `_imp___ZN2sf5SoundC1Ev'|F:\CodeBlocks\lopetru\main.cpp|45|undefined reference to `_imp___ZN2sf5Sound9setBufferERKNS_11SoundBufferE'|F:\CodeBlocks\lopetru\main.cpp|46|undefined reference to `_imp___ZN2sf5Sound4playEv'|F:\CodeBlocks\lopetru\main.cpp|44|undefined reference to `_imp___ZN2sf5SoundD1Ev'|F:\CodeBlocks\lopetru\main.cpp|49|undefined reference to `_imp___ZN2sf11SoundBufferD1Ev'|F:\CodeBlocks\lopetru\main.cpp|44|undefined reference to `_imp___ZN2sf5SoundD1Ev'|F:\CodeBlocks\lopetru\main.cpp|49|undefined reference to `_imp___ZN2sf11SoundBufferD1Ev'|||=== Build failed: 9 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
et j'ai configurer le projet avec SFML