I don't understand why I keep getting the error message
The code is built successfully but when I try to debug it in Visual Studio, I get this error message:
the procedure entry point ?play@SoundStream@sf@UAEXXZ could not be located in the Dynamic Link Library
I added all the dll's from the sfml bin to the executable to no avail.
This is the code.
// Anything after // is a comment not actual C++ code
// Comments are important and I use them to explain things
// Why not read the comments in this code
// These "include" code from the C++ library and SFML too
#include <SFML/Graphics.hpp>
#include <SFML/Audio/Music.hpp>
// This is the main C++ program- Duh!
// It is where our game starts from
int main()
{
sf::Music bgmusic;
bgmusic.openFromFile("RockGuitar.wav");
// Make a window that is 800 by 200 pixels
// And has the title "Hello from SFML"
sf::RenderWindow window(sf::VideoMode(800, 200), "Hello from SFML");
// Create a "Text" object called "message". Weird but we will learn about objects soon
sf::Text message;
// We need to choose a font
sf::Font font;
font.loadFromFile("28 Days Later.ttf");
// Set the font to our message
message.setFont(font);
// Assign the actual message
message.setString("I want to pill myself");
// Make it really big
message.setCharacterSize(100);
// Choose a color
message.setFillColor(sf::Color::White);
// This "while" loop goes round and round- perhaps forever
while (window.isOpen())
{
// The next 6 lines of code detect if the window is closed
// And then shuts down the program
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
// Someone closed the window- bye
window.close();
}
// Clear everything from the last run of the while loop
window.clear();
// Draw our message
window.draw(message);
// Draw our game scene here
// Just a message for now
// Show everything we just drew
window.display();
bgmusic.play();
}// This is the end of the "while" loop
return 0;
}
Can anyone help??