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

Author Topic: ATTN: People getting linker errors in VS 2005 express, etc.  (Read 2913 times)

0 Members and 1 Guest are viewing this topic.

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
ATTN: People getting linker errors in VS 2005 express, etc.
« on: March 04, 2008, 04:29:34 pm »
I've seen a lot of questions from people about this, so hopefully I can clear some stuff up...

I'm assuming you already read and followed the building with VS tutorial, but are still having problems.
First off, there seems to be issues with the author's version of VS being incompatible with other versions, thus making pre-compiled .dlls and .libs he released potentially unusable.  Fortunately, it's open source so you just have to recompile them!
First off, the express edition does not ship with the windows platform SDK.  You need this.  Get it here.  Once you've installed the SDK, you need to link the IDE to it.  Go to tools->options->projects and solutions->C++ directories.  Select "includes" from the pulldown and add the include directory of wherever you installed the platform SDK to.  Now change the pulldown to libraries and do the same for the SDK lib directory.
Open the SFML solution at SFML-1.2\vc2005\SFML.sln (obv use the vc 2008 dir if your using 2008).  Rebuild all.  You will probably get multiple linker errors.
Now here's the kicker...  actually read the errors instead of just panicking.  Each one will be complaining about a certain function/symbol not being defined.  For example, EnumDisplaySettings or GetDeviceCaps.    A quick google search will bring you to the relevant MSDN entry.  At the bottom of each MSDN entry, it says what include/library that function is in.  The two libs that kept coming up were User32.Lib and Gdi32.lib.  You need to right-click->properties->linker->input on each project and add the libs it needs to additional dependencies.  (Just type the name of the lib)
You can right-click->project only->rebuild x only to try getting each individual project building.  Note that some projects are dependent on others and might have to be built in a certain order.  Also, you won't be able to build the widgit and quicktime-based projects unless the relevant apps are installed.  Finally, you may have to input the User32.Lib, etc. to projects linking to SFML as well.
Hopefully this helps.  Good luck.  If something's unclear, ask for clarification.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
ATTN: People getting linker errors in VS 2005 express, etc.
« Reply #1 on: March 04, 2008, 05:17:02 pm »
Thanks a lot for this, I hope it will help people getting troubles with SFML and VC++ :)
Laurent Gomila - SFML developer

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
ATTN: People getting linker errors in VS 2005 express, etc.
« Reply #2 on: August 12, 2008, 03:08:24 am »
bump, since this information is apparently still needed.

 

anything