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

Author Topic: Problems linking dynamically  (Read 3061 times)

0 Members and 1 Guest are viewing this topic.

fallout

  • Newbie
  • *
  • Posts: 15
    • View Profile
Problems linking dynamically
« on: March 07, 2011, 04:25:23 am »
I've followed tutorials, searched the threads and made changes, recompiled for VS 2010 and so on but I can't make the following error go away:

fatal error LNK1104: cannot open file 'sfml-system-d.lib'

For linker input I've used: sfml-system-d.lib;

I've added SFML_DYNAMIC;

for the preprocessor defintion. I've added all the appropriate paths for the include and library directories. I also have the .dll files in the project directories, even for the DEBUG folder. Haven't done a release build yet.

Static linking works perfectly fine and without errors but I would like to link dynamically. Any suggestions?

EDIT: sorry, this should have been posted in general.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problems linking dynamically
« Reply #1 on: March 07, 2011, 07:29:27 am »
Are you sure that you recompiled all configurations of SFML (there are 4: debug static, debug DLL, release static and release DLL)?
Laurent Gomila - SFML developer

fallout

  • Newbie
  • *
  • Posts: 15
    • View Profile
Problems linking dynamically
« Reply #2 on: March 07, 2011, 08:41:42 pm »
Yes.

BlueMagic

  • Newbie
  • *
  • Posts: 49
    • View Profile
Problems linking dynamically
« Reply #3 on: September 11, 2011, 08:54:11 pm »
I'm having the exact same problem. I tried everything but couldn't get it to work.

EDIT: While doublechecking the path where the libs are supposed to be found, I realized that there's only one .lib : sfml-main-d.lib. All of the others are not there, which is strange since supposedly they compiled correctly. Any ideas?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problems linking dynamically
« Reply #4 on: September 11, 2011, 08:57:17 pm »
Sorry to ask such a stupid question, but have you checked that the file is actually located in the linker path that you defined in your project settings?
Laurent Gomila - SFML developer

BlueMagic

  • Newbie
  • *
  • Posts: 49
    • View Profile
Problems linking dynamically
« Reply #5 on: September 11, 2011, 09:03:22 pm »
Quote from: "Laurent"
Sorry to ask such a stupid question, but have you checked that the file is actually located in the linker path that you defined in your project settings?


Yeah, it was not a stupid question at all, haha (check the edit). The thing is, only sfml-main was correctly compiled into a .lib. A problem with the VS solution?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problems linking dynamically
« Reply #6 on: September 11, 2011, 09:06:17 pm »
The automatic conversion to VS2010 projects has some problems, output paths may not be consistent. You should check in the SFML projects where the libraries are generated.
Laurent Gomila - SFML developer

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Problems linking dynamically
« Reply #7 on: September 11, 2011, 10:46:31 pm »
Yeah the conversion messes with the output dirs. The DLL debug names for the lib files are the same as DLL release lib files. Messy and confusing. I just compiled them for you and uploaded them. Enjoy 8)

http://coderzilla.com/libraries/SFML-1/binaries/1.6-MSVC10/
CoderZilla - Everything Programming

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problems linking dynamically
« Reply #8 on: September 12, 2011, 08:04:21 am »
You should put these files on the wiki, so that I can redirect people there when there are issues with VC++ 2010 :)
Laurent Gomila - SFML developer