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

Author Topic: SFML on VC++ 2015 (x64)  (Read 6452 times)

0 Members and 1 Guest are viewing this topic.

adomas

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Adomas Homepage
SFML on VC++ 2015 (x64)
« on: January 22, 2016, 07:56:43 pm »
Hello,
I have this strange issue. I use SFML 2.3.2 on Visual Studio Enterprise 2015. With Win32 (x86) configuration everything is OK, but when I try to compile on x64 I get errors. I use shared configurations and accordingly 32bit or 64bit SFML. On 64bit Release I get these Linker errors:

Severity   Code   Description   Project   File   Line   Suppression State
Error   LNK2001   unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)   GameTest103   D:\Workbench\Software\Dev\GameTest103\GameTest103\main.obj   1   
Error   LNK2001   unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)   GameTest103   D:\Workbench\Software\Dev\GameTest103\GameTest103\main.obj   1   

How to I solve this? I use Console subsystem on both. x86 compiles fine with 32bit SFML and runs smoothly. But does not compile and link in x64 version and with 64bit SFML. What to do? Might be an error for SFML 2.3.2 VC++ 14 (2015) 64bit? BTW running Windows 10 Enterprise 64bit

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
SFML on VC++ 2015 (x64)
« Reply #1 on: January 22, 2016, 10:23:25 pm »
You must have defined SFML_STATIC even though you use dynamic libs. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

adomas

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Adomas Homepage
Re: SFML on VC++ 2015 (x64)
« Reply #2 on: January 23, 2016, 05:18:27 pm »
I tried to define SFML_STATIC, but it did not help, I still get same error. I also tried using static libs, but I got even more linker errors. Any ideas?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: SFML on VC++ 2015 (x64)
« Reply #3 on: January 23, 2016, 07:05:12 pm »
I tried to define SFML_STATIC, but it did not help
You must have defined SFML_STATIC
This means that you did define it but you shouldn't (when linking dynamically).
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

adomas

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Adomas Homepage
Re: SFML on VC++ 2015 (x64)
« Reply #4 on: January 24, 2016, 07:20:23 pm »
Linker error does not change, with SFML_STATIC defined and not defined. It does not have impact on error :(

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
SFML on VC++ 2015 (x64)
« Reply #5 on: January 24, 2016, 07:45:07 pm »
Post your full build command then.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Raneman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML on VC++ 2015 (x64)
« Reply #6 on: January 25, 2016, 03:02:14 am »
Or just use -d.dll's

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML on VC++ 2015 (x64)
« Reply #7 on: January 25, 2016, 01:52:36 pm »
Or just use -d.dll's

-d indicates debug libs, not dynamic.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Raneman

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML on VC++ 2015 (x64)
« Reply #8 on: January 27, 2016, 02:51:15 pm »
-s.dlls ofc, my mistake.

Rosme

  • Full Member
  • ***
  • Posts: 169
  • Proud member of the shoe club
    • View Profile
    • Code-Concept
Re: SFML on VC++ 2015 (x64)
« Reply #9 on: January 29, 2016, 04:04:06 pm »
There are no -s.dll since -s indicate static, and it's only on the .lib. Please inform yourself before saying false stuff(twice).
GitHub
Code Concept
Twitter
Rosme on IRC/Discord