Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error with program  (Read 2070 times)

0 Members and 1 Guest are viewing this topic.

jordangh67

  • Newbie
  • *
  • Posts: 3
    • View Profile
Error with program
« 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   

 

Hapax

  • Hero Member
  • *****
  • Posts: 3359
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Error with program
« Reply #1 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.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything