SFML community forums
Help => Graphics => Topic started by: Mikea on January 07, 2009, 09:25:12 pm
-
After linking.
1>main.obj : error LNK2001: unresolved external symbol "private: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA)
1>C:\Users\Michael\Documents\Visual Studio 2008\SFML\PongClone\Debug\PongClone.exe : fatal error LNK1120: 1 unresolved externals
Googled for it and nothing came up..
-
Define SFML_DYNAMIC, or use the static libraries.
-
Ok, Thanks.
one more thing tho, what's the difference between the static and dynamic libs??
-
The static libs are integrated to your executable, while the dynamic ones require the SFML DLLs.
-
Nice!! thank you :D
-
You aren't making sense laurent... Define what? It still gives the link error if you link the libs...
-
You aren't making sense laurent... Define what? It still gives the link error if you link the libs...
Hum? Sorry, I don't get what you mean.
-
I've linked the libraries and i still get the error.
-
Well, this is not supposed to be a "solution". Linking against the dynamic or static libraries must be a choice based on what you want. I just wanted to point the error.
What you have to remember is that when linking against dynamic libraries (what you first did, according to the error message) you have to define the SFML_DYNAMIC symbol in your project, as explained in the tutorials.
If it's still not working, please explain in detail what you do and how you setup your project.
-
in the tutorial I think in that part, there is a missing/broken image.. just above "Compiling SFML (for advanced users)"
-
in the tutorial I think in that part, there is a missing/broken image.. just above "Compiling SFML (for advanced users)"
Laurent: I don't know where to put the SFML_DYNAMIC macro. There is no image so we don't know where it exactly is. Can you please tell us where to put it?
Thanks,
YellowShadow
-
Sorry, I'll put the image back this evening.
In your project's properties, go to "C/C++" --> "Preprocessor" and add SFML_DYNAMIC to "Preprocessor definitions".