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

Author Topic: SFML 2 Linker error VS2012  (Read 3984 times)

0 Members and 1 Guest are viewing this topic.

Suicidal

  • Newbie
  • *
  • Posts: 7
    • View Profile
SFML 2 Linker error VS2012
« on: October 30, 2012, 12:16:54 am »
When i tried to use the newly compiled libraries in my project linker error in the below occurred. Any solutions?

1>sfml-graphics-s.lib(jerror.obj) : error LNK2001: unresolved external symbol __imp__fprintf

[attachment deleted by admin]

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML 2 Linker error VS2012
« Reply #1 on: October 30, 2012, 12:22:26 am »
I wonder if the day will ever come where everyone understands the concept of using a search function (or posting in the right forum)... ::)

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Suicidal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SFML 2 Linker error VS2012
« Reply #2 on: October 30, 2012, 12:34:28 am »
Actually I've already read these posts but doesn't get the solution. I'm started to thinking my english isn't enough for this :) I will read these posts again. Thanks.
« Last Edit: October 30, 2012, 12:37:59 am by Suicidal »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML 2 Linker error VS2012
« Reply #3 on: October 30, 2012, 12:38:44 am »
Actually I've already read those posts but doesn't get the solution. I'm started to thinking my english isn't enough for this :) I will read those again. Thanks.
If you have notice the connection, then why did you have to open up a new thread? ;)
You could've simply posted there and asked again how to 'resolve' this issue, which was already answered by Laurent:
Quote from: Laurent
In other words: disable the USE_STATIC_STD_LIBS option in CMake when you recompile SFML.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Suicidal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SFML 2 Linker error VS2012
« Reply #4 on: October 30, 2012, 12:45:07 am »
I want to link libraries statically to my application. Is Laurent's answer gonna fix my problem ? Thanks.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML 2 Linker error VS2012
« Reply #5 on: October 30, 2012, 01:10:17 am »
I want to link libraries statically to my application.
You do that by unchecking BUILD_SHARED_LIBS, the USE_STATIC_STD_LIBS will also link the runtime library statically. The only problem at the moment is, that static runtime libraries will cause the linker errors and thus you can't use them at the moment. So to successfully link your application rebuild SFML without the USE_STATIC_STD_LIBS flag and everything will work.

If you really, really, really want to link the runtime library statically, you'll have to rebuild the external libraries.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/