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?