I have been trying to install SFML for months with no luck. Today I decided to try again. At first it didn't even find the SFML\graphics.hpp include file, but I finally fixed that. Now I am getting a new error. When compiling the code below, I get a bunch of errors. Here is the code:
#include <SFML\Graphics.hpp>
int main() {
int window_width = 640;
int window_height = 480;
sf::RenderWindow window(sf::VideoMode(window_width, window_height), "SFML Tutorial");
while (window.isOpen()) {
// handle events
// update game logic
window.clear();
// draw objects
window.display();
}
return 0;
}
And here are the errors: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main SFML Template C:\Users\theyo\Desktop\SFML\SFML Template\SFML Template\SFML Template.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main SFML Template C:\Users\theyo\Desktop\SFML\SFML Template\SFML Template\SFML Template.obj 1
I actually get too many to put into this post, and I don't know where I'd find a log file to give you. I know probably no one will be able to help, but please if you understand then try to help.
I also get 6 of these warnings: Severity Code Description Project File Line Suppression State Warning LNK4272 library machine type 'x64' conflicts with target machine type 'x86' SFML Template C:\Users\theyo\Desktop\SFML\External Libraries\SFML\lib\sfml-graphics-d.lib 1
- one for each library file in SFML.
Today alone, I have frame for frame copied the following video https://www.youtube.com/watch?v=_9yem5dJt2E with no luck. I am getting desperate. Thanks.