Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Single Linker Error Left VS 2010  (Read 2168 times)

0 Members and 1 Guest are viewing this topic.

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
Single Linker Error Left VS 2010
« 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!
Douglas E Reisinger II
http://www.palodequeso.net

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Single Linker Error Left VS 2010
« Reply #1 on: December 20, 2010, 05:35:02 pm »
You probably forgot SFML_DYNAMIC (read the tutorial again ;)).
Laurent Gomila - SFML developer

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
Single Linker Error Left VS 2010
« Reply #2 on: December 20, 2010, 06:16:57 pm »
I definitely did that...
I have double checked and triple checked.
Douglas E Reisinger II
http://www.palodequeso.net

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Single Linker Error Left VS 2010
« Reply #3 on: December 20, 2010, 06:21:47 pm »
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?
Laurent Gomila - SFML developer

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
Single Linker Error Left VS 2010
« Reply #4 on: December 20, 2010, 06:33:54 pm »
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.
Douglas E Reisinger II
http://www.palodequeso.net

PaloDeQueso

  • Newbie
  • *
  • Posts: 16
    • AOL Instant Messenger - palodequeso
    • View Profile
    • http://www.palodequeso.net
    • Email
Single Linker Error Left VS 2010
« Reply #5 on: December 20, 2010, 06:36:52 pm »
*face palm*

it compiles now...

Thanks for your patience. It doesn't run yet, but I'll figure it out.

Again... thanks!
Douglas E Reisinger II
http://www.palodequeso.net

 

anything