SFML community forums

Help => Graphics => Topic started by: Mikea on January 07, 2009, 09:25:12 pm

Title: [text/font] I get a new error since update to sfml1.4
Post 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..
Title: [text/font] I get a new error since update to sfml1.4
Post by: Laurent on January 07, 2009, 09:28:07 pm
Define SFML_DYNAMIC, or use the static libraries.
Title: [text/font] I get a new error since update to sfml1.4
Post by: Mikea on January 07, 2009, 09:34:07 pm
Ok, Thanks.

one more thing tho, what's the difference between the static and dynamic libs??
Title: [text/font] I get a new error since update to sfml1.4
Post by: Laurent on January 07, 2009, 10:01:59 pm
The static libs are integrated to your executable, while the dynamic ones require the SFML DLLs.
Title: [text/font] I get a new error since update to sfml1.4
Post by: Mikea on January 07, 2009, 10:58:42 pm
Nice!! thank you :D
Title: [text/font] I get a new error since update to sfml1.4
Post by: efeXor on January 11, 2009, 01:35:36 pm
You aren't making sense laurent... Define what? It still gives the link error if you link the libs...
Title: [text/font] I get a new error since update to sfml1.4
Post by: Laurent on January 11, 2009, 04:09:03 pm
Quote
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.
Title: [text/font] I get a new error since update to sfml1.4
Post by: efeXor on January 11, 2009, 08:08:05 pm
I've linked the libraries and i still get the error.
Title: [text/font] I get a new error since update to sfml1.4
Post by: Laurent on January 11, 2009, 08:40:08 pm
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.
Title: [text/font] I get a new error since update to sfml1.4
Post by: Mikea on January 11, 2009, 09:10:56 pm
in the tutorial I think in that part, there is a missing/broken image.. just above "Compiling SFML (for advanced users)"
Title: [text/font] I get a new error since update to sfml1.4
Post by: YellowShadow on January 14, 2009, 02:42:33 am
Quote from: "Mikea"
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
Title: [text/font] I get a new error since update to sfml1.4
Post by: Laurent on January 14, 2009, 07:58:06 am
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".