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

Author Topic: LNK-Error: Unresolved external... when using sf:window  (Read 4166 times)

0 Members and 1 Guest are viewing this topic.

Incubbus

  • Newbie
  • *
  • Posts: 12
    • ICQ Messenger - 315161720
    • View Profile
    • http://incubbus.eu
LNK-Error: Unresolved external... when using sf:window
« on: April 16, 2010, 08:39:03 pm »
Quote
Error   12   error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)   c:\Users\Incubbus\documents\visual studio 2010\Projects\sfml-window\sfml-window\sfml-window-s.lib(WindowImplWin32.obj)



what the hack?... i did link wiht ANY library and it still does not work...
i only succeeded in compiling the clock-example... hahahah... (yes i have the right directorys included)... i did just copy the examples for creating a window...

anyone may know what i did misconfigure?...

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: LNK-Error: Unresolved external... when using sf:window
« Reply #1 on: April 17, 2010, 12:50:15 am »
Quote from: "Incubbus"
Quote
Error   12   error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)   c:\Users\Incubbus\documents\visual studio 2010\Projects\sfml-window\sfml-window\sfml-window-s.lib(WindowImplWin32.obj)



what the hack?... i did link wiht ANY library and it still does not work...
i only succeeded in compiling the clock-example... hahahah... (yes i have the right directorys included)... i did just copy the examples for creating a window...

anyone may know what i did misconfigure?...


Okay I can only think of two things thats wrong.

1. Your order of the librarys are messed up (but I dont think that happens anymore. I dont know. I had a weird problem like that a long time ago. I use sfml-graphics-s.lib
sfml-window-s.lib
sfml-system-s.lib
sfml-main.lib

2. I see your using Visual Studios 2010. I dout you compiled your librarys with visual studios 2010 therefore you need to tell visual studios to use the compiler from 2008.

Project -> Properties -> Platform Toolset -> Set to v90.

Hope this helps.
CoderZilla - Everything Programming

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
LNK-Error: Unresolved external... when using sf:window
« Reply #2 on: April 17, 2010, 11:57:47 am »
"__declspec(dllimport)..."

did you try using SFML_DYNAMIC?

Incubbus

  • Newbie
  • *
  • Posts: 12
    • ICQ Messenger - 315161720
    • View Profile
    • http://incubbus.eu
LNK-Error: Unresolved external... when using sf:window
« Reply #3 on: April 18, 2010, 02:20:07 am »
why dynamic?... i use the static lib... what i am suprised of, is that the system-header-stuff works...

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
LNK-Error: Unresolved external... when using sf:window
« Reply #4 on: April 18, 2010, 08:23:45 pm »
Sorry, my bad, I was stupid :)

What SFML version are you using?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
LNK-Error: Unresolved external... when using sf:window
« Reply #5 on: April 18, 2010, 08:30:27 pm »
What runtime library do you use? (project properties --> C/C++ --> Code generation --> Runtime library)
Laurent Gomila - SFML developer

Incubbus

  • Newbie
  • *
  • Posts: 12
    • ICQ Messenger - 315161720
    • View Profile
    • http://incubbus.eu
LNK-Error: Unresolved external... when using sf:window
« Reply #6 on: April 24, 2010, 12:43:17 pm »
I´m sorry for the late answer: had work to do...

I am using...:

...SMFL-Version: 1.6
...Runtime Library: Multithreaded Debug DLL (/MDd)

(i already tried setting MSBuild to v09 didnt change anything)...

 

anything