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

Author Topic: Error - Graphics/Window - Static Lib  (Read 3222 times)

0 Members and 1 Guest are viewing this topic.

Neobeum

  • Newbie
  • *
  • Posts: 6
    • View Profile
Error - Graphics/Window - Static Lib
« on: June 04, 2015, 09:55:31 am »
Hello
I am new to programming, but I have gotten SFML working on a few other projects before.

When I tried updating via GitHub and making a CMake Project, I received errors during my build. So I decided to download the Zip from http://www.sfml-dev.org/download/sfml/2.3/

32Bit - VS2013.

I have linked the libraries exactly how I had done before, and included the SFML_STATIC macro.

However I get this error. As you can see, it's not even building anything other than a window, but there are some referrences to the Texture.cpp.obj in the error list.



here's a screenshot of my program window working before I started the update.



Thanks in advance. Hopefully I didn't screw anything up. I've only been programming for about 3 months.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #1 on: June 04, 2015, 10:00:20 am »
I think you forgot to link the dependencies of SFML. Since 2.2, or 2.1? can't remember exactly, when linking SFML statically you have to link the dependencies yourself. Here is a list of all dependencies: http://www.sfml-dev.org/tutorials/2.3/start-vc.php


AlexAUT

Neobeum

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #2 on: June 04, 2015, 04:40:28 pm »
here's a cropped and highlighted version of the screenshot above. i've linked the -s-d.lib files.




i'll try and play around with it again and maybe go back down a version if i can't get 2.3 working

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Error - Graphics/Window - Static Lib
« Reply #3 on: June 04, 2015, 04:59:58 pm »
Is it so hard to read the static linking part of the SFML 2.3 tutorial? Don't read the 2.2 or 2.1 or 2.0 tutorial, there have been changes and they are only in the 2.3 tutorial. The changes are that you have to link the dependencies now as well.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #4 on: June 04, 2015, 05:00:12 pm »
Read the tutorial.
You're missing SFML dependencies, it's necessary to link them if you want to link SFML statically.

Neobeum

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #5 on: June 04, 2015, 05:05:05 pm »
The CMake Github build and the 2.3 Zip file didn't contain the opengl32.lib

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Error - Graphics/Window - Static Lib
« Reply #6 on: June 04, 2015, 05:20:33 pm »
They come with your toolchain. ::)
It's all written there.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

epitaque

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #7 on: June 11, 2015, 12:48:57 am »
It's happening to me too -  I think it is for different reasons though since I included all of the dependencies. If you wouldn't mind letting me know what I did wrong (I know you get hundreds of these posts about linking) it would be greatly appreciated. I've successfully statically linked SFML 2.2 in the past but SFML 2.3 seems to be giving me issues with the Debug part. (The release one works perfectly) I am using Visual Studio 13 and 64 bit SFML. Here are all the settings:
All Configurations->Configuration Properties->VC++ Directories->Include Directories:
(click to show/hide)
All Configurations->Configuration Properties->VC++ Directories->Library Directories:
(click to show/hide)
Release->Configuration Properties->Linker->Additional Dependencies:
(click to show/hide)
Debug->Configuration Properties->Linker->Additional Dependencies:
(click to show/hide)
Console log:
(click to show/hide)

SpeCter

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #8 on: June 11, 2015, 11:46:29 pm »
Did you define SFML_STATIC? If not, read the tutorial carefully again.
And is there any reason for using the 64 Bit sfml libraries?

epitaque

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error - Graphics/Window - Static Lib
« Reply #9 on: July 06, 2015, 08:17:31 pm »
Yes, I did.
In SFML 2.2 the 32 bit binaries did not work for me, so I used the 64 bit ones, which did work. I figured the same might happen in 2.3, but now the Debug part doesn't work.

Edit: Downloaded SFML for Visual C++ 12 (2013) - 64-bit again, and this time it worked.
Edit: It only worked because I set the debug configuration to use the Release configuration
Edit: Tried 32 bit version. Same thing happened - the Release configuration works but the debug configuration does not. Will try to learn how to use CMake tomorrow and see if building it myself works.
« Last Edit: July 07, 2015, 04:39:20 am by epitaque »

 

anything