SFML community forums

General => General discussions => Topic started by: nitram_cero on December 07, 2008, 01:12:28 pm

Title: unresolved symbol sf::Color::<whatever> on DLL builds.
Post by: nitram_cero on December 07, 2008, 01:12:28 pm
unresolved external symbol "public: static class sf::Color const sf::Color::Black"

It seems to only happen on DLL builds. Static builds work ok.

Maybe those color statics should be declared as SFML_API (dllimport/export)?

Regards
-Martín
Title: unresolved symbol sf::Color::<whatever> on DLL builds.
Post by: bullno1 on December 07, 2008, 05:32:30 pm
Strange. I'm using those pre-defined color in dll build without problem.
Title: unresolved symbol sf::Color::<whatever> on DLL builds.
Post by: Laurent on December 07, 2008, 05:33:44 pm
To use the dynamic build you have to define SFML_DYNAMIC in your compiler's options.
Title: unresolved symbol sf::Color::<whatever> on DLL builds.
Post by: nitram_cero on December 07, 2008, 06:23:32 pm
Oh, I'm really sorry then. Didn't knew.

It worked fine thou without doing it, except for those static colors.


Another thing, in the SVN 950 version the static projects have correctly selected option to build them as a static library but bind to the Multithreaded DLL of the CRT (debug and release acordingly).

Is this correct?
Title: unresolved symbol sf::Color::<whatever> on DLL builds.
Post by: Laurent on December 07, 2008, 08:43:54 pm
Yes it is.