SFML community forums
Help => General => Topic started by: kwuuak on April 20, 2009, 11:00:23 pm
-
hi guys:)
i'm working on a project and i have a problem i dont understand
i declare a variable of the type sf::string and there appears an error message when i close the application
it says: the operation "read" couldn't be executed to the memory in "0x....."
but i just declare the variable and don't do anything else
(sorry i had to translate it on my own)
kwuuak
-
It's a known bug.
-
wow you are very fast:D
is there any way to deal with??
-
Wait until the fix is done.
-
There are currently two workarounds:
- Use the static libraries of SFML
- Never use the default font, which means always passing a sf::Font to sf::String constructors
-
There are currently two workarounds:
- Use the static libraries of SFML
- Never use the default font, which means always passing a sf::Font to sf::String constructors
Ho ya... those too :D
-
or if you are using .net. Use reflection to get the default font and delete it. That works for me
-
thank you all guys:)
i need dynamic libraries i think, so i'll try the second possibility
Edit: Passing font to strings constructor works fine
-
i need dynamic libraries i think
I'm just curious: why?
-
I created a post some time ago where you gave me the advice to use them, laurent :wink:
i 'm creating a snake clone, where i save the the piecesof the snake in a list of the stl :)
pushing a sf::shape ( i use sf::sprite now, but it's the same) into the list cause errors but linking dynamic libraries solves
so thanks for solving both my problems :wink:
-
This one?
http://www.sfml-dev.org/forum/viewtopic.php?t=1123
I don't see any advice to use the dynamic libraries. And I don't see where we talk about static libraries.
-
yeah, i mean this treads.
i have to admit i don't know much about the using of different types of libraries and the differences, but you told me to define SFML_DYNAMIC
, which solves the problem.
Correct me if i am wrong, but i thought by defining SFML_DYNAMIC you automatically use the dynamic libraries and not the static ones.
-
Correct me if i am wrong, but i thought by defining SFML_DYNAMIC you automatically use the dynamic libraries and not the static ones
No no. Static and dynamic build produce two different binaries ; choosing one or the other is just a matter of choosing which file to link against.
Then, you define or not SFML_DYNAMIC only to let SFML know which version you've chosen.
On Linux, only the dynamic libraries are provided by default. On Windows, both static and dynamic versions are given, the static ones have a "-s" suffix in their names.
-
hmm...
but for example i linked against libsfml-graphics and not against libsfml-graphics-s or libsfml-graphics-d.
Now you told to use the macro SFML_DYNAMIC and it worked.
Now i thought without any macro i link against the static ones, but by setting this macro i link against the dynamic ones, because i neither link against the static nor against the dynamic and leave this question open.
-
Now i thought without any macro i link against the static ones
I repeat what I said: the configuration is determined by the file, not the macro.
libsfml-xxx is the dynamic/release build
libsfml-xxx-d is the dynamic/debug build
libsfml-xxx-s is the static/release build
libsfml-xxx-s-d is the dynamic/debug build
The SFML_DYNAMIC macro has to be defined when you link to either libsfml-xxx or libsfml-xxx-d, to inform SFML that you have chosen the dynamic library.
I think you were confused by the -d suffix, which is for "debug" not "dynamic" ;)
-
I think you were confused by the -d suffix, which is for "debug" not "dynamic" ;)
Yeah you are right :D Sure i also now about debug libraries, but if there is the "-s" for static libraries the "-d" fits so well for dynamic ones :wink:
i think i understand now, thank you very mich :)