SFML community forums
Help => General => Topic started by: PaloDeQueso on December 20, 2010, 04:56:34 pm
-
I'm mainly a linux developer, but recently wanted to make sure my "cross-platform" project was actually cross-platform. So I compiled my project under MinGW just fine, but realized I might want to connect to mysql for some stuff just to experiment, but the library and dll are only compiled for visual studio. Seeing how I might want to let others work on my project to sometime and that visual studio is seemingly the standard dev studio for windows, it should compile there anyway.
I'm using visual c++ express 10. I've compiled SFML 1.6 using it and are using the release dynamic libraries... I have defined SFML_DYNAMIC in the preprocessor directives for the project and have one lasting linker error...
error LNK2001: unresolved external symbol "private: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA)
I'm pretty stumped on this last one, any ideas?
Here are the libraries I'm linking in order...
(glew32s glut32 glu32 opengl32 sfml-system sfml-audio sfml-network sfml-window sfml-graphics assimp BulletDynamics BulletCollision LinearMath)
I believe all should be in place... perhaps there's just some features that don't exist in the windows build of SFML like this Default Charset... I'm as of yet unsure.
Thanks in advance for any help!
-
You probably forgot SFML_DYNAMIC (read the tutorial again ;)).
-
I definitely did that...
I have double checked and triple checked.
-
Ah... but the linker error clearly says that you didn't define it (otherwise you would have some kind of "__imp" in the unresolved symbol). By the way, you should have the same error if you try to use predefined colors (sf::Color::Red, etc.).
How did you define SFML_DYNAMIC?
-
exactly as the tutorial for 1.6 told me to, by going into the project properties and going to Configuration Properties\C++\Preprocessor and adding SFML_DYNAMIC; to the beginning of the Preprocessor Definitions line. However, I just realized that I am using cmake and there are several projects in this "Solution". I am going to add the preprocessor definition to cmake and try that. One thing to note, I was adding SFML_DYNAMIC to the project in the solution that actually generates the exe. The other projects are just my own libraries that are being compiled.
-
*face palm*
it compiles now...
Thanks for your patience. It doesn't run yet, but I'll figure it out.
Again... thanks!