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

Author Topic: Ok in debug mode but error in release (w7, 1.6 and vc 2010)  (Read 7461 times)

0 Members and 1 Guest are viewing this topic.

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« on: October 07, 2011, 09:31:12 pm »
Environment
Windows 7 Enterprise 64
SFML 1.6
Visual C++ 2010 Express

When I installed SFML in vc2010 I have followed all instructions in this video:
http://www.youtube.com/watch?v=-uHGZGgMETg
and made everything work in debug mode and have had some joy in making games for some weeks now.

Today, when I tried to build my first project in release mode, something went wrong.
I get the error:
Code: [Select]
cannot open input file 'sfml-system-s.lib'

It's not that odd I suppose, since all sfml-<name>-s.lib vas deleted in the process of creating a 2010 express install from the 2008 express files, all according to the install video on Youtube.

Under the heading Linker - Additional Dependencies. In debug mode I have:
Code: [Select]
sfml-system-s-d.lib
sfml-window-s-d.lib
sfml-graphics-s-d.lib
sfml-audio-s-d.lib


And in release mode I have:

Code: [Select]
sfml-system-s.lib
sfml-window-s.lib
sfml-graphics-s.lib
sfml-audio-s.lib


but when I take a peek in my 2010 lib which is linked through heading:
Linker-Additional Library Directories C:\sfml16\SFML-1.6\lib\vc2010;%(AdditionalLibraryDirectories)

I do find the sfml-<name>-s-d.lib
 and sfml-<name>-d.lib, but no sfml-<name>-s.lib.

Any idea where things have gone wrong? I have tried to change Heading Linker EnableIncrementalLinking to no avail.

PS.
Under heading C/C++-General I have AdditionalIncludeDirectories C:\sfml16\SFML-1.6\include;%(AdditionalIncludeDirectories)
if that can be of any help.

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #1 on: October 08, 2011, 11:03:21 pm »
I tried to make it dynamic instead. ereased all text in: linker - input - additional directives to rule out all connections to missing files, After that, I copied all files that were sfml-<name>-d.dll to the projects debug library and all ¨sfml-<name>.dll to the release library.

Added #define SFML_DYNAMIC at the top and tried debug mode:
This actually works in static mode... Errors are:

1>------ Build started: Project: sfml ljudtestare, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &)" (?Draw@RenderTarget@sf@@UAEXABVDrawable@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Clock::Reset(void)" (?Reset@Clock@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::SetFramerateLimit(unsigned int)" (?SetFramerateLimit@Window@sf@@QAEXI@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ) referenced in function "void __cdecl EndProgram(void)" (?EndProgram@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function "void __cdecl EndProgram(void)" (?EndProgram@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Sprite::SetImage(class sf::Image const &)" (?SetImage@Sprite@sf@@QAEXABVImage@2@@Z) referenced in function "void __cdecl Move(void)" (?Move@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ) referenced in function "void __cdecl Move(void)" (?Move@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Drawable::Move(float,float)" (?Move@Drawable@sf@@QAEXMM@Z) referenced in function "void __cdecl Move(void)" (?Move@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z) referenced in function "void __cdecl Move(void)" (?Move@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (?GetInput@Window@sf@@QBEABVInput@2@XZ) referenced in function "void __cdecl Move(void)" (?Move@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Drawable::SetPosition(float,float)" (?SetPosition@Drawable@sf@@QAEXMM@Z) referenced in function "public: __thiscall BulletStruct::BulletStruct(void)" (??0BulletStruct@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Sprite::Sprite(void)" (??0Sprite@sf@@QAE@XZ) referenced in function "public: __thiscall Image::Image(void)" (??0Image@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Drawable::~Drawable(void)" (??1Drawable@sf@@UAE@XZ) referenced in function "public: virtual __thiscall sf::Sprite::~Sprite(void)" (??1Sprite@sf@@UAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Sprite::SetSubRect(class sf::Rect<int> const &)" (?SetSubRect@Sprite@sf@@QAEXABV?$Rect@H@2@@Z) referenced in function "void __cdecl SkapaExplosion(int,int)" (?SkapaExplosion@@YAXHH@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function "void __cdecl `dynamic initializer for 'window''(void)" (??__Ewindow@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function "void __cdecl `dynamic initializer for 'window''(void)" (??__Ewindow@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'Clock''(void)" (??__EClock@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Image::~Image(void)" (??1Image@sf@@QAE@XZ) referenced in function __unwindfunclet$??0Data@@QAE@XZ$0
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Image::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadFromFile@Image@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall Data::Data(void)" (??0Data@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Image::Image(void)" (??0Image@sf@@QAE@XZ) referenced in function "public: __thiscall Data::Data(void)" (??0Data@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'window''(void)" (??__Fwindow@@YAXXZ)
1>C:\Users\Teacher\documents\visual studio 2010\Projects\sfml ljudtestare\Debug\sfml ljudtestare.exe : fatal error LNK1120: 25 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

After that, I tried in release mode and got these errors:

1>------ Build started: Project: sfml ljudtestare, Configuration: Release Win32 ------
1>  main.cpp
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Drawable::Move(float,float)" (?Move@Drawable@sf@@QAEXMM@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Drawable::SetPosition(float,float)" (?SetPosition@Drawable@sf@@QAEXMM@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall sf::Drawable::~Drawable(void)" (??1Drawable@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Image::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadFromFile@Image@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Image::~Image(void)" (??1Image@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Image::Image(void)" (??0Image@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Window::SetFramerateLimit(unsigned int)" (?SetFramerateLimit@Window@sf@@QAEXI@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (?GetInput@Window@sf@@QBEABVInput@2@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Clock::Reset(void)" (?Reset@Clock@sf@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Sprite::SetSubRect(class sf::Rect<int> const &)" (?SetSubRect@Sprite@sf@@QAEXABV?$Rect@H@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::Sprite::SetImage(class sf::Image const &)" (?SetImage@Sprite@sf@@QAEXABVImage@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Sprite::Sprite(void)" (??0Sprite@sf@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &)" (?Draw@RenderTarget@sf@@UAEXABVDrawable@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z)
1>C:\Users\Teacher\documents\visual studio 2010\Projects\sfml ljudtestare\Release\sfml ljudtestare.exe : fatal error LNK1120: 25 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
(I cut away the rows with warnings saying I could loose informtion changing from float to int when I place sprites in the game).

In static mode, I can debug but not do a release build, in dynamic mode, I can do neither, any ideas what is wrong?

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #2 on: October 11, 2011, 10:36:31 am »
I found another video:
http://www.youtube.com/watch?v=tyUDuOGPpOk&feature=related
How to make SFML work on Visual C++ 2010[statically]

I recompiled the vc++ 2008 SDK to 2010 all according to the film. I realized that in the first film, creating the static release part wasn't shown. Now, I do have all sfml-name>-s.lib files. But it doesn't matter. Debug works fine, but in release mode, I get these (fewer) errors.

1>------ Build started: Project: sfml_klampe_test, Configuration: Release Win32 ------
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in sfml-window-s.lib(WindowImplWin32.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" (?_Facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprt.lib(locale0_implib.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprt.lib(MSVCP100.dll)
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP100.dll)
1>LIBCMT.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll)
1>LIBCMT.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRT.lib(MSVCR100.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
1>D:\Users\iwiklund\Documents\Visual Studio 2010\Projects\sfml_klampe_test\Release\sfml_klampe_test.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Isn't there anyone out there with the same setup as I that actually can make exe-files from sfml-projects? And can share how it's done? (please!).

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #3 on: October 11, 2011, 11:40:53 am »
To narrow it down
*I created a standalone folder.

*I put all <name>-s.lib
in a folder of their own named libs and pasted it into the standalone folder.

*I copied the original "include" folder from the re-compiled sfml 1.6 library and pasted it into the standalone folder.

*I linked to sfml-system-s.lib in:
 linker-input
additionaldependencies

*I linked to the copy-pasted include folder in: C/C++ Additional directories.

*I linked to the folder libs in: Linker-General: Additional Library Directories.

* I changed C/C++ Preprocessor Preprocessor definitions
and added: SFML_STATIC on top of the other.

* I changed C/C++ - Code generation: Runtime library to Multi-threaded (/MT)
__________________
After that, I added the code for the clock (as simple as possible) and got this output:

1>------ Build started: Project: testrelease, Configuration: Release Win32 ------
1>  stdafx.cpp
1>  testrelease.cpp
1>testrelease.cpp(1): warning C4627: '#include <SFML/System.hpp>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>testrelease.cpp(2): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>testrelease.cpp(15): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Frustrating, sooooo frustrating.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32144
    • View Profile
    • SFML's website
    • Email
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #4 on: October 11, 2011, 11:53:36 am »
You must disable precompiled headers, since you don't use them.
Laurent Gomila - SFML developer

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #5 on: October 11, 2011, 01:25:09 pm »
SOLVED!

Quote from: "Laurent"
You must disable precompiled headers, since you don't use them.


I wish I knew how to do it.

Anyway, I can make my own programs after several hours. Both the films from Youtube proved to have some errors in them.

As I found out, the first film only shows how to create debug versions of the files. Not the release versions. Makes it hard to see if you've never done it before. What to do? Solution
Compile:
 Debug_static= 6 ok
 Debug DLL = 5 ok 1 up to date
release_static 6 ok
release DLL = 5ok 1 up to date
Then, checking both release and debug alternatives (with no options) by hitting F7 shows 6 up to date in both cases.

Delete all files in <sfml>\lib and rename the folder there to vc2010.

Do not change the option (in release mode):
C/C++
  Code Generation
        Multi-threaded DLL(/MD)

Errors in the second film? Well, it is stated in the second Youtube clip that it should be changed to
Multi-threaded (/MT)
But that cause most of the, if not all the, errors. I honestly don't know the difference though.

Add C/C++
   Preprocessor
      Pre processor definitions

Fill in SFML_STATIC as the last option. Like this:
WIN32
NDEBUG
_CONSOLE
SFML_STATIC

Link C/C++
   General
     Additional Include Directories
to the include folder <sfml>\include

Link  Linker
    Additional Library Directories
to the re-named folder in lib vc2010
<sfml>\lib\vc2010

Add Linker
    Input
      Additional dependencies

sfml-system-s-d.lib
 sfml-window-s-d.lib
 sfml-graphics-s-d.lib

in debug mode and


sfml-system-s.lib
 sfml-window-s.lib
 sfml-graphics-s.lib

in release mode.

Now, it works.
I don't know if it could work better, but at least it works.  :D

If someone else is in the same situation, here is a dropbox link to the files, compiled for :
Windows 7 enterprise 64bit
Visual c++ 2010 express
SFML 2010
Just unpack the zip file (the whole sfml library with the compiled files) and make sure you link to the right libraries according to the instruction above.

Dropbox link:
http://dl.dropbox.com/u/8595437/w7enterprise_64__vs2010xp_sfml16.zip

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Ok in debug mode but error in release (w7, 1.6 and vc 2010)
« Reply #6 on: October 12, 2011, 07:55:25 pm »
I wish I knew how to do it.


Disabling precompiled headers is easy.

Right click your project->Properties
Configuration Properties->C/C++->Precompiled Headers
Change from Use to not using.

Then remove stdafx.h/.cpp from your project, including all references.


Not that it really matters if your problem is solved.

 

anything