sfml:cannot link program in release mode but ok in debug mode

Started by
38 comments, last by pulpfist 12 years, 1 month ago
hi

i had successfully link and run a program in sfml 1.6 in debug mode. but when i tried to compile the same program with release mode, i got the following errors:

any help will be appreciated. my os is win 7 x64. ide: vc++ 2010 express.

1>------ Build started: Project: 4ROLL, Configuration: Release Win32 ------
1>SFML-graphics-s-d.lib(Shape.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(Shape.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1>SFML-graphics-s-d.lib(Drawable.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(String.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(Font.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(Color.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(RenderWindow.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(RenderTarget.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(Matrix3.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(Image.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(FontLoader.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(GraphicsContext.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(View.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-graphics-s-d.lib(ImageLoader.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(Window.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(VideoMode.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(Input.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(Context.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(WindowImpl.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(VideoModeSupport.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(WindowImplWin32.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-window-s-d.lib(Joystick.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-system-s-d.lib(Unicode.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-system-s-d.lib(Clock.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-system-s-d.lib(Sleep.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>SFML-system-s-d.lib(Platform.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in board.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' 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>C:\Users\rob\DevC++ source\MSVC++\misc\4ROLL\Release\4ROLL.exe : fatal error LNK1319: 25 mismatches detected
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Advertisement
Under project properties, when you are in release mode, what does this field say:


Configuration Properties - Linker - Input - Additional Dependencies

And what does this field say when you are in debug mode?
hi pulpfist:
now i know what the problem is. thanks.
under debug:

SFML-graphics-s-d.lib;SFML-audio-s-d.lib;SFML-window-s-d.lib;SFML-network-s-d.lib;SFML-system-s-d.lib;%(AdditionalDependencies)

under release:

SFML-graphics-s-d.lib;SFML-audio-s-d.lib;SFML-window-s-d.lib;SFML-network-s-d.lib;SFML-system-s-d.lib;%(AdditionalDependencies)

now when i compile another program i got the following errors:
i think i have to setup the whole project properties again. is there a way to not have to do that for every new project?
i know i have to do the project manager setting again. but what did i do wrong that the project manager of my previous project did not changes to and carries into the new project?

thanks

1>------ Build started: Project: newtest, Configuration: Debug Win32 ------
1> graphics-shape.cpp
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-window-s.lib(WindowImplWin32.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-window-s.lib(Window.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-window-s.lib(VideoMode.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-window-s.lib(WindowImpl.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-window-s.lib(VideoModeSupport.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-graphics-s.lib(RenderWindow.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported in function "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ)
1>sfml-graphics-s.lib(Shape.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported
1>sfml-graphics-s.lib(Image.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported in function __ehhandler$??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z
1>sfml-graphics-s.lib(ImageLoader.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (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> >(void)) imported in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>sfml-window-s.lib(WindowImplWin32.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-window-s.lib(Window.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-window-s.lib(VideoMode.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-window-s.lib(WindowImpl.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-window-s.lib(VideoModeSupport.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-graphics-s.lib(RenderWindow.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported in function "protected: static void __cdecl std::vector<unsigned char,class std::allocator<unsigned char> >::_Xlen(void)" (?_Xlen@?$vector@EV?$allocator@E@std@@@std@@KAXXZ)
1>sfml-graphics-s.lib(Shape.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-graphics-s.lib(Image.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported
1>sfml-graphics-s.lib(ImageLoader.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (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> >(char const *)) imported in function "public: __thiscall std::logic_error::logic_error(class std::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z)
1>sfml-graphics-s.lib(ImageLoader.obj) : warning LNK4217: locally defined symbol ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB (public: static unsigned int const std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::npos) imported in function "public: bool __thiscall sf::priv::ImageLoader::SaveImageToFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class sf::Color,class std::allocator<class sf::Color> > const &,unsigned int,unsigned int)" (?SaveImageToFile@ImageLoader@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@5@II@Z)
1>sfml-window-s.lib(WindowImplWin32.obj) : 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)
1>sfml-window-s.lib(Window.obj) : 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)
1>sfml-window-s.lib(VideoMode.obj) : 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)
1>sfml-window-s.lib(WindowImpl.obj) : 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)
1>sfml-window-s.lib(VideoModeSupport.obj) : 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)
1>sfml-graphics-s.lib(RenderWindow.obj) : error LNK2019: 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) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>sfml-graphics-s.lib(Shape.obj) : 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)
1>sfml-graphics-s.lib(Image.obj) : 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)
1>sfml-graphics-s.lib(ImageLoader.obj) : 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)
1>sfml-graphics-s.lib(Image.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z)
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) referenced in function "public: bool __thiscall sf::priv::ImageLoader::LoadImageFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class sf::Color,class std::allocator<class sf::Color> > &,unsigned int &,unsigned int &)" (?LoadImageFromFile@ImageLoader@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@5@AAI2@Z)
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator==<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 &,char const *)" (__imp_??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z) referenced in function "public: bool __thiscall sf::priv::ImageLoader::SaveImageToFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class sf::Color,class std::allocator<class sf::Color> > const &,unsigned int,unsigned int)" (?SaveImageToFile@ImageLoader@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@5@II@Z)
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::substr(unsigned int,unsigned int)const " (__imp_?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z) referenced in function "public: bool __thiscall sf::priv::ImageLoader::SaveImageToFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class sf::Color,class std::allocator<class sf::Color> > const &,unsigned int,unsigned int)" (?SaveImageToFile@ImageLoader@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@VColor@sf@@V?$allocator@VColor@sf@@@std@@@5@II@Z)
1>C:\Users\rob\DevC++ source\SFML\newtest\Debug\newtest.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Hi,

First of all, just for the record, in release mode the field should look like this

SFML-graphics-s.lib;SFML-audio-s.lib;SFML-window-s.lib;SFML-network-s.lib;SFML-system-s.lib;%(AdditionalDependencies)

Notice how -d is removed from the file names.


SFML comes with two versions of each library. One with the -d ending that should be used when you build in debug mode, and one without the -d ending that should be used in release mode.




As far as I know, since VS 2010, you have to set up the project settings for each project. There is no global settings anymore, if I remember correctly.


The last landslide you posted also seems to be settings related.
You can search for info about how to set up a project in visual studio 2010.
I seem to remember the SFML documentation has a wiki page about it.


edit:
It's bed time over here now.
bbl
hi

Hi,

First of all, just for the record, in release mode the field should look like this

SFML-graphics-s.lib;SFML-audio-s.lib;SFML-window-s.lib;SFML-network-s.lib;SFML-system-s.lib;%(AdditionalDependencies)

Notice how -d is removed from the file names.


SFML comes with two versions of each library. One with the -d ending that should be used when you build in debug mode, and one without the -d ending that should be used in release mode.




As far as I know, since VS 2010, you have to set up the project settings for each project. There is no global settings anymore, if I remember correctly.


The last landslide you posted also seems to be settings related.
You can search for info about how to set up a project in visual studio 2010.
I seem to remember the SFML documentation has a wiki page about it.


edit:
It's bed time over here now.
bbl


thanks
hi,
after i changed the project property from release mode to sfml-graphics-s.lib...etc, i still have these errors when compiled. anyone please help.

hi,
after i changed the project property from release mode to sfml-graphics-s.lib...etc, i still have these errors when compiled. anyone please help.


I'm not 100% sure but I think you have to remove the -s from those file names as well, assuming they mean "static linkage"

The default setting for a new project is dynamic linkage, not static, so that might fix the problem

[quote name='nickme' timestamp='1330487137' post='4917611']
hi,
after i changed the project property from release mode to sfml-graphics-s.lib...etc, i still have these errors when compiled. anyone please help.


I'm not 100% sure but I think you have to remove the -s from those file names as well, assuming they mean "static linkage"

The default setting for a new project is dynamic linkage, not static, so that might fix the problem
[/quote]

hi
after i deleted the -s from the file names, i still having the same problem. the output still similar to the last one. thank for the reply.
Thats strange.

If you follow these instructions it should work though http://www.sfml-dev.....6/start-vc.php

Notice the last step about SFML_DYNAMIC. It could be the cause of the linker errors.



Also notice that since VS2010 the settings is no longer under the global Tools menu but you will find them under each projects properties instead

Thats strange.

If you follow these instructions it should work though http://www.sfml-dev.....6/start-vc.php

Notice the last step about SFML_DYNAMIC. It could be the cause of the linker errors.



Also notice that since VS2010 the settings is no longer under the global Tools menu but you will find them under each projects properties instead


HI
thank for the reply. now my debug mode does not works as well. for SFML-graphics-s-d.lib, what does s and d stand for? now, when i compile and run the program in vc++, i got a message that said i have to copy *.dll to the directory of the source files. i did not have to do that before. why do i have to do that now?

when i build and run the program in release mode, it crashed. it was running just fine this morning and before i changed the preprocessor to SFML_DYNAMIC.

i am not claiming that you made my situation worse, i know you are trying to help me. i can always go back to where i was before, if i remember what is the setting before. maybe i did not provide the relevant info to you, which i do not know at this time. sorry :(


thanks

This topic is closed to new replies.

Advertisement