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

Author Topic: Visual Studio 2005 & SFML-1.6  (Read 4233 times)

0 Members and 1 Guest are viewing this topic.

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« on: May 23, 2011, 09:31:43 am »
I've set up SFML with VS2005 successfully before, but have now come back to it and can't get it to work.

I'm using the sample on the tutorial page:
Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}


My additional include directories under C++ -> General:
Quote
"$(DEV_DIR)\SFML-1.6\include"


Additional library directories:
Quote
"$(DEV_DIR)\SFML-1.6\lib"


In my linker dependencies:
Quote
sfml-system-s-d.lib


When I run from within VS, I get the message:
Quote
"The system cannot execute the specified program."


I also get some warnings, which as I understand it, mean that I'm not using the correct debug .lib? But I'm using sfml-system-s-d.lib, and my Code Generation settings are Multi-threaded Debug DLL (/MDd). Here are the warnings:
Quote
1>sfml-system-s-d.lib(Platform.obj) : warning LNK4099: PDB 'vc80.pdb' was not found with 'E:\Dev\SFML-1.6\lib\sfml-system-s-d.lib' or at 'e:\dev\projects\sfml test2\debug\vc80.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Clock.obj) : warning LNK4099: PDB 'vc80.pdb' was not found with 'E:\Dev\SFML-1.6\lib\sfml-system-s-d.lib' or at 'e:\dev\projects\sfml test2\debug\vc80.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Sleep.obj) : warning LNK4099: PDB 'vc80.pdb' was not found with 'E:\Dev\SFML-1.6\lib\sfml-system-s-d.lib' or at 'e:\dev\projects\sfml test2\debug\vc80.pdb'; linking object as if no debug info


I'm using a fresh, out of the box SFML-1.6 package. I haven't rebuilt the projects in the build directory, and from what I can see I'm using all the right project settings.

I'm not sure what I'm doing wrong here...

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #1 on: May 25, 2011, 11:22:30 am »
I downloaded the 2008 package of SFML 1.6 and it worked fine.

C++ settings:
Code: [Select]
/Od /I "E:\Dev\SFML-1.6\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /ZI /TP /errorReport:prompt

Linker settings:
Code: [Select]
/OUT:"E:\Dev\Projects\SFML Test4\Debug\SFML Test4.exe" /INCREMENTAL /NOLOGO /LIBPATH:"E:\Dev\SFML-1.6\lib" /MANIFEST /MANIFESTFILE:"Debug\SFML Test4.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"e:\Dev\Projects\SFML Test4\Debug\SFML Test4.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT sfml-system-s-d.lib sfml-window-s-d.lib sfml-graphics-s-d.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

I just downloaded the 2005 package of SFML 1.6 again to be sure, but it still won't work. What the hell?

Edit: Just pointed my VS2005 project to use the SFML package for VS2008 and it works fine... that's retarded. Edit: Until I included anything but System... when I tried an example with Windows it gives me:
Code: [Select]
1>sfml-window-s-d.lib(Window.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) referenced in function "public: void __thiscall std::deque<class sf::Event,class std::allocator<class sf::Event> >::push_back(class sf::Event const &)" (?push_back@?$deque@VEvent@sf@@V?$allocator@VEvent@sf@@@std@@@std@@QAEXABVEvent@sf@@@Z)
1>sfml-window-s-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>sfml-window-s-d.lib(VideoModeSupport.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>sfml-window-s-d.lib(Window.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >::~_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@VEvent@sf@@@std@@@std@@IAE@XZ)
1>sfml-window-s-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>sfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>sfml-window-s-d.lib(Window.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >::_Container_base_aux_alloc_empty<class std::allocator<class sf::Event> >(class std::allocator<class sf::Event>)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@VEvent@sf@@@std@@@std@@IAE@V?$allocator@VEvent@sf@@@1@@Z)
1>sfml-window-s-d.lib(VideoMode.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>sfml-window-s-d.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>E:\Dev\Projects\SFML Test2\Debug\SFML Test2.exe : fatal error LNK1120: 3 unresolved externals

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #2 on: May 25, 2011, 11:52:38 am »
I built the VS 2005 SFML 1.6 solution in both debug static and release static and it works fine now. Why won't it work using the precompiled libs?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Visual Studio 2005 & SFML-1.6
« Reply #3 on: May 25, 2011, 12:05:54 pm »
Maybe your version of VS 2005 is not compatible with mine (yes, it happens sometimes). What is your version?
Laurent Gomila - SFML developer

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #4 on: May 25, 2011, 02:05:38 pm »
Quote from: "Laurent"
Maybe your version of VS 2005 is not compatible with mine (yes, it happens sometimes). What is your version?


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Visual Studio 2005 & SFML-1.6
« Reply #5 on: May 25, 2011, 02:08:07 pm »
I can't compare (I uninstalled mine recently) but it looks ok.
Laurent Gomila - SFML developer

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #6 on: May 25, 2011, 02:47:24 pm »
Hm. I'd really love to know what I was doing wrong then, as it was as much of a barebone installation as possible, I'd thought.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #7 on: May 25, 2011, 03:09:55 pm »
I use SFML 1.6 and VS 2005 under Win 7 64 bit, and everything works just fine. What can I send you to compare settings?

Did you recompile the SFML libs yourself?

Ed

Edit: Sorry I didn't see you had it working already!
SFML 2.1

mitchgc

  • Newbie
  • *
  • Posts: 27
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #8 on: May 25, 2011, 03:12:35 pm »
Quote from: "slotdev"
I use SFML 1.6 and VS 2005 under Win 7 64 bit, and everything works just fine. What can I send you to compare settings?

Did you recompile the SFML libs yourself?

Ed

Edit: Sorry I didn't see you had it working already!

Did you get it working without rebuilding the SFML projects?

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Visual Studio 2005 & SFML-1.6
« Reply #9 on: May 25, 2011, 10:18:16 pm »
Yes I used the binaries from the site, set it all up and it was fine.
SFML 2.1

 

anything