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

Author Topic: Linker errors using SFML 1.2  (Read 9126 times)

0 Members and 1 Guest are viewing this topic.

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Linker errors using SFML 1.2
« on: January 17, 2008, 04:40:31 pm »
Hi, once again I get these lovely linker errors. They really love me :(

This is my setup:

VC++ Directories:

Include files:
C:\Daniel\SFML-1.2\include

Library files:
C:\Daniel\SFML-1.2\lib\vc2008\static

Additional dependencies:
sfml-graphics-d.lib sfml-main-d.lib sfml-system-d.lib sfml-window-d.lib

This is the code I'm trying to compile (the one from the doc-page without the music and the sprite):
Code: [Select]
#include <SFML/Graphics.hpp>
 
 int main()
 {
     // Create the main window
     sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");
 
     // Create a graphical string to display
     sf::String Text("Hello SFML", "arial.ttf", 50);
 
     // Start the game loop
     bool Running = true;
     while (Running)
     {
         // Process events
         sf::Event Event;
         while (App.GetEvent(Event))
         {
             // Close window : exit
             if (Event.Type == sf::Event::Closed)
                 Running = false;
         }
 
         // Draw the string
         App.Draw(Text);
 
         // Update the window
         App.Display();
     }
 
     return EXIT_SUCCESS;
 }


This is the output:
Code: [Select]
1>------ Rebuild All started: Project: sfml12test, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'sfml12test', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-graphics-d.lib(ImageLoader.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "public: void __thiscall std::_Iterator_base::_Adopt(class std::_Container_base const *)" (?_Adopt@_Iterator_base@std@@QAEXPBV_Container_base@2@@Z)
1>sfml-window-d.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-window-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-window-d.lib(VideoModeSupport.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-graphics-d.lib(RenderWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-graphics-d.lib(String.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-graphics-d.lib(Image.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-graphics-d.lib(FontManager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>sfml-window-d.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(GraphicsDevice.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-window-d.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-window-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(RenderWindow.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function __unwindfunclet$??0?$_Vector_val@EV?$allocator@E@std@@@std@@IAE@V?$allocator@E@1@@Z$0
1>sfml-graphics-d.lib(String.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(Image.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(FontManager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>sfml-window-d.lib(WindowImpl.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "public: void __thiscall std::_Iterator_base::_Adopt(class std::_Container_base const *)" (?_Adopt@_Iterator_base@std@@QAEXPBV_Container_base@2@@Z)
1>sfml-graphics-d.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(GraphicsDevice.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-window-d.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-window-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(RenderWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(String.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(Image.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(FontManager.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
1>sfml-graphics-d.lib(Image.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Swap_aux(class std::_Container_base &)" (__imp_?_Swap_aux@_Container_base@std@@QAEXAAV12@@Z) referenced in function "public: void __thiscall std::vector<class sf::Color,class std::allocator<class sf::Color> >::swap(class std::vector<class sf::Color,class std::allocator<class sf::Color> > &)" (?swap@?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@std@@QAEXAAV12@@Z)
1>sfml-graphics-d.lib(Image.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Swap_all(class std::_Container_base &)const " (__imp_?_Swap_all@_Container_base@std@@QBEXAAV12@@Z) referenced in function "public: void __thiscall std::vector<class sf::Color,class std::allocator<class sf::Color> >::swap(class std::vector<class sf::Color,class std::allocator<class sf::Color> > &)" (?swap@?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@std@@QAEXAAV12@@Z)
1>C:\Daniel\sfml12test\Debug\sfml12test.exe : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Daniel\sfml12test\sfml12test\Debug\BuildLog.htm"
1>sfml12test - 29 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Sorry for being a pain in the ass with all these linker errors, they are haunting me.

hexapode

  • Newbie
  • *
  • Posts: 2
    • View Profile
Linker errors using SFML 1.2
« Reply #1 on: January 17, 2008, 04:58:20 pm »
I also have some link error using 1.2.... when I go back 1.1 it's work again...

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Linker errors using SFML 1.2
« Reply #2 on: January 17, 2008, 05:39:25 pm »
After building the solution found in SFML-1.2\vc2008 the code in my first post works. Can anyone explain why? Looks like it generated new static debug libraries.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linker errors using SFML 1.2
« Reply #3 on: January 18, 2008, 02:31:55 am »
I really don't understand, I compiled the entire solution with VS 2008, just like you did.

Quote
I also have some link error using 1.2.... when I go back 1.1 it's work again...

Are you also using VS2008 ?
Laurent Gomila - SFML developer

m0ng00se

  • Newbie
  • *
  • Posts: 3
    • MSN Messenger - davpet77@hotmail.com
    • View Profile
    • http://www.freewebs.com/m0ng00se
    • Email
Linker Errors grrrrrrrrrrrrrrrrrrr
« Reply #4 on: January 19, 2008, 08:54:25 am »
Hi

I downloaded SFML early today and was greatly impressed with the documentation and the way it said it would work. I have previously used Dark SDK, Irrlicht and DX93D graphics engines.

I followed the VC++ 2008 installation tutorial exactly and everything was fine until I went to link the first sample tutorial app. It compiled fine but gave me 84 unresolved external errors and 296 warnings. Yes I included the right paths and specified it to link against the SFML libraries which it found. In fact if I didn't link against the SFML libraries I only got 11 errors.

Ten hours later after trying everything I could think of I dumped all the SFML DLL files into my Project directory and got no linker errors or warnings.

Now I get an exception error at runtime startup against every SFML DLL then the application crashes. The error is as follows:

LDR: LdrpWalkImportDescriptor() failed to probe
c:\VCprojectx\SAPHIRE-3D-XIRR\sfml-graphics.dll for its manifest, ntstatus
0xc01500

that happens against every DLL regardless if I choose MT/D or M/T or dynamic or debug or runtime or the kitchen sink.

So Twelve hours from download I find this forum and read the thread on linker errors and go off to rebuild all the libraries from scratch. So once again I followed the tutorial and now I have about a hundred *.obj files that VC++ 2008 created when I ran the *.SLN project in the VC 2005 directory (as per tutorial) and chose debug static configuration.

No *.lib files or *.DLL were created and I have no idea what to do with all those *.obj files or even if what I'm trying to do will fix the problem. I'm very frustrated because the product sounded great in the documentation but if just installing it is this buggy then I've gone off the idea of trying to build a commercial 2D game with it.

None of the other graphics engines I've tested had any problems at all installing or running. They just didn't do what I need and this product seemed on paper to be exactly what I wanted.

Can anybody give me some feedback on the problems I've encountered?

m0ng00se

m0ng00se

  • Newbie
  • *
  • Posts: 3
    • MSN Messenger - davpet77@hotmail.com
    • View Profile
    • http://www.freewebs.com/m0ng00se
    • Email
Linker errors using SFML 1.2
« Reply #5 on: January 19, 2008, 09:13:21 am »
Okay I found where the compiler hid the DLL's when it built them and this time I built them with the 2008 *.SLN so now I'm about to test them

Fingers crossed.

m0ng00se

m0ng00se

  • Newbie
  • *
  • Posts: 3
    • MSN Messenger - davpet77@hotmail.com
    • View Profile
    • http://www.freewebs.com/m0ng00se
    • Email
Linker errors using SFML 1.2
« Reply #6 on: January 19, 2008, 09:22:32 am »
noooooooooooooo

LDR: LdrpWalkImportDescriptor() failed to probe c:\Storage-DO-NOT-DELETE\MyGame-BACKUP\SFML-(BROKEN)\sfml-graphics.dll for its manifest, ntstatus 0xc0150002
Debugger:: An unhandled non-continuable exception was thrown during process load

Didn't make any difference. Two more hours wasted. Aaaarghhhhhh

That's it. I give up.

Goodbye SFML. You promised so much but delivered so little.

m0ng00se

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Linker errors using SFML 1.2
« Reply #7 on: January 19, 2008, 11:53:26 am »
As I wrote earlier, it worked for me when I builded new static debug libraries, haven't tried dll's though.

Why don't you calm down and wait for Laurent to give you response. I know it can be frustrating when stuff don't work believe me.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker errors using SFML 1.2
« Reply #8 on: January 31, 2008, 11:13:39 pm »
Same problem here (also VS2008)... but a quick recompile of the debug static libs solved the problem.

For release builds the problem doesn't occur in the first place.

EDIT:
But for release builds I get this error message when trying to run the app: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem"

Again, a rebuild solved the problem.

There is something strange going on with those VS2008 libs...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linker errors using SFML 1.2
« Reply #9 on: February 01, 2008, 02:45:48 am »
This is actually a known problem. It seems that now, VS2008 has become incompatible even with itself.

Maybe I should just upgrade my VC++ 2008 version for the next builds.
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Linker errors using SFML 1.2
« Reply #10 on: February 01, 2008, 08:28:36 am »
Hm? Are there different versions (aside from Express/Standard/Professional/etc.) of VS2008?

Meh, I guess distributing exes made with VS2008 will be even more of a PITA than for VS2005...

 

anything