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

Author Topic: VC2005 linker errors  (Read 2868 times)

0 Members and 1 Guest are viewing this topic.

p.witvoet

  • Newbie
  • *
  • Posts: 3
    • View Profile
VC2005 linker errors
« on: August 11, 2008, 01:49:38 am »
Hello,

I recently installed SFML 1.3 and gave the tutorials a go. The code found in the first tutorial, Getting started - visual studio, ran fine - I only linked against sfml-system-s-d.lib (debug version).

However, once I tried the Opening a window tutorial, I encountered a bunch of linker errors (LNK2019, unresolved external symbol, all related to sfml-window-s-d.lib). I did add sfml-window-s-d.lib and sfml-graphics-s-d.lib in addition to sfml-system-s-d.lib, even tried sfml-main-d.lib, but nothing seems to work. I found some threads about similar problems on this forum but none of the proposed solutions there seems to apply here - I'm certain my include and library directories are set up correctly and I'm not mixing up debug and release versions.

I also tried linking to the dynamic versions. For the debug version, that worked - I got a window up and running. For the release version however, I got the following run-time error: unknown software exception (0xc000001d), at location 0x10005058.


Does anyone see what I'm missing here? Help would be greatly appreciated. :)

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
VC2005 linker errors
« Reply #1 on: August 11, 2008, 03:06:15 am »

p.witvoet

  • Newbie
  • *
  • Posts: 3
    • View Profile
VC2005 linker errors
« Reply #2 on: August 12, 2008, 02:06:16 am »
Thanks, that took care of the linker errors. :) I can now get the debug version to run with both static and dynamic linking (if I ignore the manifest file errors), but the release version is still giving me invalid instructions, no matter what I try. This always happens when I try to create a window, it's definitely related to sfml-window.lib/dll.


On a sidenote, would it be difficult to release compatible versions? Or perhaps I'd better take my chances with the VC2008 versions?

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
VC2005 linker errors
« Reply #3 on: August 12, 2008, 03:07:38 am »
Quote from: "p.witvoet"
Thanks, that took care of the linker errors. :) I can now get the debug version to run with both static and dynamic linking (if I ignore the manifest file errors), but the release version is still giving me invalid instructions, no matter what I try. This always happens when I try to create a window, it's definitely related to sfml-window.lib/dll.


On a sidenote, would it be difficult to release compatible versions? Or perhaps I'd better take my chances with the VC2008 versions?


At the point when I made that post originally, there were some issues with the VC2008 versions that have been fixed.  The problems you were having are related to the fact that VS2005 express does not have all the libraries the full version has by default.  There's nothing Laurent can do about that.
As for problems in release mode, are you sure you are linking to the release versions and not debug?  Also, did you try rebuilding the SFML libraries in release mode?

p.witvoet

  • Newbie
  • *
  • Posts: 3
    • View Profile
VC2005 linker errors
« Reply #4 on: August 12, 2008, 08:58:56 am »
Yes, I made sure of that. I compiled SFML in debug and release mode, both static and dynamic. And I just found out that I already had the platform SDK - I must've downloaded it a while ago.