Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Static linking
Print
Pages: [
1
]
Author
Topic: Static linking (Read 1542 times)
0 Members and 1 Guest are viewing this topic.
NiGhMa
Newbie
Posts: 2
Static linking
«
on:
October 08, 2017, 12:25:47 pm »
Hi,
I've got a strange behavior with static linking. My little game works fine but when I try to link SFML libraries I get an error closing my game. An Access Violation Memory when it tries to delete a unique_ptr I have in my ResourceManager.
Any clue why? Can I fix it?
Here's my github :
https://github.com/NiGhMa/Asteroid
PS: For the moment I link dynamically the SFML libraries
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11032
Re: Static linking
«
Reply #1 on:
October 08, 2017, 12:54:34 pm »
What's the call stack when it crashes?
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
dabbertorres
Hero Member
Posts: 505
Re: Static linking
«
Reply #2 on:
October 09, 2017, 08:00:54 pm »
SFML types aren't supported in a static context, due to undefined behavior of initialization/de-initialization order.
I bet if you make your SFML objects in
Configuration
non-static, you won't have any more issues.
For reference, see
this post
by Tank.
Logged
Github
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Static linking
anything