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

Author Topic: [Solved] Unresolved External on changing Window Size  (Read 3826 times)

0 Members and 2 Guests are viewing this topic.

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
[Solved] Unresolved External on changing Window Size
« on: April 13, 2014, 01:54:47 pm »
Hello, I have just ran into an error when trying to resize my screen via a function,

error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::setSize(class sf::Vector2<unsigned int> const &)" (__imp_?setSize@Window@sf@@QAEXABV?$Vector2@I@2@@Z) referenced in function "public: void __thiscall Lester::GameScreen(void)" (?GameScreen@Lester@@QAEXXZ)
 

This is the function resizing:

void Lester::GameScreen()
{
   window.clear();
   window.setTitle("Lester V0.1");
   window.setSize(sf::Vector2u(960, 550));
   Screen();
}
 

Any ideas?

Cheers
« Last Edit: April 14, 2014, 05:54:42 am by JTeck »

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Unresolved External on changing Window Size
« Reply #1 on: April 13, 2014, 04:16:16 pm »
That's a linker error, so you're not linking against the SFML libs correctly.  Reread the SFML build tutorial very carefully and double check all of the IDE settings it mentions.

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Unresolved External on changing Window Size
« Reply #2 on: April 14, 2014, 12:37:56 am »
That's a linker error, so you're not linking against the SFML libs correctly.  Reread the SFML build tutorial very carefully and double check all of the IDE settings it mentions.

I've re-read the build tutorial, the IDE settings are the exact same as everything else, before I added that function into my project, it was all working fine.

o.O

Sqasher

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Unresolved External on changing Window Size
« Reply #3 on: April 14, 2014, 01:36:41 am »
The code seems fine to me. That error is definitely a linker error. See here:
Linker Tools Error LNK2019

Maybe you are using Visual Studio 2013 and downloaded the libraries from the website? Then you would need to compile SFML yourself.

JTeck

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Unresolved External on changing Window Size
« Reply #4 on: April 14, 2014, 01:55:06 am »
The code seems fine to me. That error is definitely a linker error. See here:
Linker Tools Error LNK2019

Maybe you are using Visual Studio 2013 and downloaded the libraries from the website? Then you would need to compile SFML yourself.

compiled SFML for my VS Studio 2013, added the .dll files to the project and it still does it.

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Unresolved External on changing Window Size
« Reply #5 on: April 14, 2014, 11:40:08 am »
added the .dll files
Those aren't the files you are looking for  ;)

Try the .lib files.

 

anything