SFML community forums

General => General discussions => Topic started by: jordangh67 on September 03, 2019, 07:13:36 pm

Title: Error with program
Post by: jordangh67 on September 03, 2019, 07:13:36 pm
I have followed a video on how to setup sfml however the program I have written doesn't seem to run and i get a linker error.

#include <iostream>

#include <SFML/Graphics.hpp>

int main()
{
   sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
   

   return 0;
}

Error:
   
LNK2019   unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main   Timber   C:\Users\jorda\OneDrive - Limerick Institute Of Technology\Self projects\SFML tutorials\Slfm Tut 2\Timber\Timber.obj   1   

 
Title: Re: Error with program
Post by: Hapax on September 04, 2019, 12:39:24 am
Most common reason for this sort of error that I've seen on this forum and also with my own experience is mixing the debug and release libraries; they should always match the build type.