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

Author Topic: Can't compile test project  (Read 6495 times)

0 Members and 1 Guest are viewing this topic.

konsnos

  • Newbie
  • *
  • Posts: 3
    • View Profile
Can't compile test project
« on: April 10, 2014, 07:48:20 pm »
Hello everyone. I tried to set up a sample project with sfml and I failed miserably, without knowing why.

I have a bunch of errors. One warning though, I'm in Win8 using Visual Studio 2013. I hope this isn't the reason of the errors.

My settings for debug build are

  • C++>Include -> C:\SFML-2.1\include
  • C++>Preprocessor-> SFML_STATIC
  • Linker>Additional Library Directories-> C:\SFML-2.1\lib
  • Linker>Additional Dependencies-> sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib

Code: [Select]
Error 1 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Color.cpp.obj) Project1
Error 2 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(RenderTarget.cpp.obj) Project1
Error 3 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(RenderWindow.cpp.obj) Project1
Error 4 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shape.cpp.obj) Project1
Error 5 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(CircleShape.cpp.obj) Project1
Error 6 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(RenderStates.cpp.obj) Project1
Error 7 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Transform.cpp.obj) Project1
Error 8 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(View.cpp.obj) Project1
Error 9 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shader.cpp.obj) Project1
Error 10 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Texture.cpp.obj) Project1
Error 11 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(GLCheck.cpp.obj) Project1
Error 12 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Image.cpp.obj) Project1
Error 13 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Transformable.cpp.obj) Project1
Error 14 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(VertexArray.cpp.obj) Project1
Error 15 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(TextureSaver.cpp.obj) Project1
Error 16 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(ImageLoader.cpp.obj) Project1
Error 17 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(VideoMode.cpp.obj) Project1
Error 18 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(Window.cpp.obj) Project1
Error 19 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(VideoModeImpl.cpp.obj) Project1
Error 20 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(GlContext.cpp.obj) Project1
Error 21 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(WindowImpl.cpp.obj) Project1
Error 22 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(WglContext.cpp.obj) Project1
Error 23 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(JoystickManager.cpp.obj) Project1
Error 24 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(WindowImplWin32.cpp.obj) Project1
Error 25 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(JoystickImpl.cpp.obj) Project1
Error 26 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-system-s-d.lib(String.cpp.obj) Project1
Error 27 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-system-s-d.lib(Err.cpp.obj) Project1
Error 28 error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in main.obj c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-system-s-d.lib(ThreadLocal.cpp.obj) Project1
Error 29 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(WindowImplWin32.cpp.obj) Project1
Error 30 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Image.cpp.obj) Project1
Error 31 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(ImageLoader.cpp.obj) Project1
Error 32 error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) referenced in function "void __cdecl `dynamic initializer for 'public: static class std::_Generic_error_category std::_Error_objects<int>::_Generic_object''(void)" (??__E?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A@@YAXXZ) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(Window.cpp.obj) Project1
Error 33 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-window-s-d.lib(WglContext.cpp.obj) Project1
Error 34 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(RenderTarget.cpp.obj) Project1
Error 35 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shader.cpp.obj) Project1
Error 36 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Texture.cpp.obj) Project1
Error 37 error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(GLCheck.cpp.obj) Project1
Error 38 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::ios_base::operator void *(void)const " (__imp_??Bios_base@std@@QBEPAXXZ) referenced in function "bool __cdecl `anonymous namespace'::getFileContents(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<char,class std::allocator<char> > &)" (?getFileContents@?A0xfefba1af@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@DV?$allocator@D@std@@@3@@Z) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shader.cpp.obj) Project1
Error 39 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall std::basic_istream<char,struct std::char_traits<char> >::_Add_vtordisp1(void)" (__imp_?_Add_vtordisp1@?$basic_istream@DU?$char_traits@D@std@@@std@@UAEXXZ) referenced in function "[thunk]:public: virtual void __thiscall std::basic_istream<char,struct std::char_traits<char> >::_Add_vtordisp1`vtordisp{4294967292,88}' (void)" (?_Add_vtordisp1@?$basic_istream@DU?$char_traits@D@std@@@std@@$4PPPPPPPM@FI@AEXXZ) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shader.cpp.obj) Project1
Error 40 error LNK2001: unresolved external symbol "public: virtual void __thiscall std::basic_ios<char,struct std::char_traits<char> >::_Add_vtordisp2(void)" (?_Add_vtordisp2@?$basic_ios@DU?$char_traits@D@std@@@std@@UAEXXZ) c:\Users\konstantinos\documents\visual studio 2013\Projects\Project1\Project1\sfml-graphics-s-d.lib(Shader.cpp.obj) Project1
Error 41 error LNK1120: 4 unresolved externals c:\users\konstantinos\documents\visual studio 2013\Projects\Project1\Debug\Project1.exe Project1

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Can't compile test project
« Reply #1 on: April 10, 2014, 07:52:51 pm »
You can not use VS 2012 libs with VS 2013, so first go try the cmake tutorial and compile SFML yourself.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

konsnos

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can't compile test project
« Reply #2 on: April 10, 2014, 08:13:59 pm »
You can not use VS 2012 libs with VS 2013, so first go try the cmake tutorial and compile SFML yourself.
Thank you.

konsnos

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can't compile test project
« Reply #3 on: April 10, 2014, 08:36:39 pm »
Just installed VS2012 and it worked. Compiling SFML seemed too much hassle for no reason for now. Thanks again :)

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Can't compile test project
« Reply #4 on: April 10, 2014, 08:40:20 pm »
... Compiling SFML seemed too much hassle for no reason for now. Thanks again :)
It's really trivial to do and it's useful to know how if you ever need/want to use the latest code from the git repository or use a compiler that there are no prebuild binaries for.
Seriously, it takes less than 5 minutes to install the needed tools, clone the repo and do the build.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Can't compile test project
« Reply #5 on: April 10, 2014, 10:55:04 pm »
Not to mention the added benefit of some nice C++11 features and support of several nice libraries that you can find around the forums.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Can't compile test project
« Reply #6 on: April 11, 2014, 08:55:15 am »
And if it's a problem to compile SFML (which has one of the easiest compilation process; imagine other libs with dozens of dependencies), I wonder what other showstopping problems will occur...

It's better to take the time to try and learn those things. It will save you much frustration later on.

didii

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Can't compile test project
« Reply #7 on: April 12, 2014, 02:53:38 pm »
It's better to take the time to try and learn those things. It will save you much frustration later on.
And it doesn't even cost a lot of time either.