SFML community forums

Help => General => Topic started by: Betaserver on October 13, 2013, 07:24:24 pm

Title: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 13, 2013, 07:24:24 pm
Hello. I'm trying to install SFML 2.0 for Microsoft Visual C++ 2010. Whenever I try to build some sample code to test whether SFML has been installed properly, I get this error:
fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

 I have looked at many other online resources, but they were either too vague or didn't work. I guess here is the sample code if you want it.

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

I am running Wndows 7 Professional, 64-Bit

Thanks for reading this  :D If you need more info to debug let me know.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 13, 2013, 07:28:17 pm
Not sure where you searched, but the error is quite clear: You're trying to link x64 libraries with your x86 compiler, which just doesn't work.
Which SFML package did you download? Did you make sure to switch the compiler of VS to x64?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 13, 2013, 07:30:37 pm
I downloaded SFML for Visual C++ 10 (2010) - 64 bits. I found it on http://www.sfml-dev.org/download/sfml/2.0/ (http://www.sfml-dev.org/download/sfml/2.0/). It is the first one down from the top right. And thanks for the fast reply!
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 13, 2013, 07:39:30 pm
I am very new to MSVC++, so I do not know how to change my compiler to x64. Could you show me or link me? Thanks
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Sqasher on October 13, 2013, 08:38:01 pm
Just google:

http://msdn.microsoft.com/... (http://msdn.microsoft.com/library/9yb4317s(v=vs.100).aspx)

Note that the 64-bit tools are not available on the Express versions by default.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 13, 2013, 09:14:06 pm
I can't find the Build menu... am I an idiot? Where is it located?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 13, 2013, 09:56:02 pm
I don't see any mention of the Build menu on that page so I'm not sure it matters.

Also, are you using Express?  If you are and you can't compile for x64 anyway then you should just go download the x86 binaries instead.  Most x86 programs run fine on x64 so it's not that important.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 14, 2013, 04:22:14 am
Well, I switched my target machine to x86 and downloaded and set up the 32-bit version of SFML 2.0. Now, it gives me this error.
1>------ Build started: Project: SFML, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main
1>C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

I think I'm making progress. Anyone have any solutions?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 14, 2013, 04:40:00 am
Did you read the official tutorial (http://www.sfml-dev.org/tutorials/2.1/start-vc.php)? If not, you really should!

The error above means that you're not linking against the needed libraries (Window & System).
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 15, 2013, 01:09:58 am
Yes, that was my first step. I did skip the C/c++ -> Preprocessor stuff, as I thought that was optional.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 15, 2013, 01:20:24 am
Don't "think," read the tutorial carefully.  The preprocessor part is mandatory for static linking and doesn't apply to dynamic linking.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 15, 2013, 02:58:06 am
I followed the Preprocessor, and it didn't change anything. And the error was my fault partially. I had only put sfml-graphics.lib in the Additional Dependencies. (I think that was my problem.) Now when I put in sfml-window-s-d.lib sfml-system-s-d.lib sfml-network-s-d.lib sfml-audio-s-d.lib, it gives me this error:
fatal error LNK1104: cannot open file 'sfml-window-s-d.lib sfml-system-s-d.lib sfml-network-s-d.lib sfml-audio-s-d.lib'
I'm very confused at this point  :-\
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 15, 2013, 03:05:54 am
"cannot open file" = File doesn't exist

Make sure you point to the right directory where the files are actually placed.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 15, 2013, 03:27:42 am
I very much doubt that. I forgot to mention it in the last post, but when I just have sfml-graphics.lib for example, it gives me the earlier error. I think that it is looking for a file named sfml-graphics-s-d.lib sfml-system-s-d.lib etc. instead of looking for multiple files. Is there a way I should separate each one?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 15, 2013, 03:30:51 am
You're actually completely right.  You have to use ; instead of spaces to separate the filenames.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 15, 2013, 03:46:59 am
Cool. I fixed that. One problem solved. Now, I get this error.
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (__imp_??1CircleShape@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (__imp_?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Green" (__imp_?Green@Color@sf@@2V12@B)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (__imp_??0CircleShape@sf@@QAE@MI@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main

And thanks for your help and patience. I really appreciate it  ;D
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 15, 2013, 04:05:56 am
Well now you have exactly that "optional" thing that's not optional at all, go read the tutorial!
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 15, 2013, 04:22:21 am
Like I said before, I read the Preprocessor part. I have SFML_STATIC;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) for it. Is that right?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 15, 2013, 04:56:53 am
Make a clean rebuilt then, because "dllimport" means that it's trying to find shared libraries, which means SFML_STATIC is not defined, so I guess the main.obj is outdated and needs to be freshly built.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: binary1248 on October 15, 2013, 07:25:28 am
If all else fails: http://en.sfml-dev.org/forums/index.php?topic=12552.0
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 16, 2013, 05:24:32 am
I tried that Exploiter, but it gave me the same error :/
And I followed your tutorial binary, and it gave me this log:
1>------ Build started: Project: SFML, Configuration: Debug Win32 ------
1>  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  cl /c /I"C:\Users\Cameron\Desktop\SFML-2.0\include" /ZI /nologo- /W3 /WX- /Od /Oy- /D SFML_STATIC /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt main.cpp
1>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release
1>  
1>  Skipping... (no relevant changes detected)
1>  main.cpp
1>  Microsoft (R) Incremental Linker Version 10.00.30319.01
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  "/OUT:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe" "/LIBPATH:C:\Users\Cameron\Desktop\SFML-2.0\lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" "sfml-network-s-d.lib" "sfml-audio-s-d.lib" /MANIFEST "/ManifestFile:Debug\SFML.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.lib" /MACHINE:X86 Debug\main.obj
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
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: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (??0CircleShape@sf@@QAE@MI@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Shape::~Shape(void)" (??1Shape@sf@@UAE@XZ) referenced in function "public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (??1CircleShape@sf@@UAE@XZ)
1>sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsA@12 referenced in function "public: static class std::vector<class sf::VideoMode,class std::allocator<class sf::VideoMode> > __cdecl sf::priv::VideoModeImpl::getFullscreenModes(void)" (?getFullscreenModes@VideoModeImpl@priv@sf@@SA?AV?$vector@VVideoMode@sf@@V?$allocator@VVideoMode@sf@@@std@@@std@@XZ)
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QAE@PAUHWND__@@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyIcon@4 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function "public: virtual class sf::Vector2<int> __thiscall sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@H@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setPosition(class sf::Vector2<int> const &)" (?setPosition@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@H@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "public: virtual class sf::Vector2<unsigned int> __thiscall sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@I@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setSize(class sf::Vector2<unsigned int> const &)" (?setSize@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@I@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SendMessageA@16 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateIcon@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCursor@4 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::registerWindowClass(void)" (?registerWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::registerWindowClass(void)" (?registerWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsA@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::switchToFullscreen(class sf::VideoMode const &)" (?switchToFullscreen@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TrackMouseEvent@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ScreenToClient@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__MapVirtualKeyA@8 referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned int,long)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@IJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CallWindowProcA@20 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe : fatal error LNK1120: 45 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 16, 2013, 06:31:11 am
If I'm reading that output right, you aren't linking against any part of SFML at all.

Either start over from scratch with a blank project and follow the entire tutorial step by step, or show us all of the relevant settings so we can tell you which one you got wrong.  You're probably overcomplicating this.
Title: AW: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: eXpl0it3r on October 16, 2013, 07:27:17 am
You're not linking against sfml-graphics.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: binary1248 on October 16, 2013, 10:27:59 am
If I'm reading that output right, you aren't linking against any part of SFML at all.
Code: [Select]
Microsoft (R) Incremental Linker Version 10.00.30319.01
Kind of gives a hint that the linker is being invoked ;). Then if you follow the command line:
Code: [Select]
"/OUT:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe" "/LIBPATH:C:\Users\Cameron\Desktop\SFML-2.0\lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" "sfml-network-s-d.lib" "sfml-audio-s-d.lib" /MANIFEST "/ManifestFile:Debug\SFML.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.lib" /MACHINE:X86 Debug\main.obj
"sfml-window-s-d.lib" "sfml-system-s-d.lib" "sfml-network-s-d.lib" "sfml-audio-s-d.lib"
You will notice that all the required libraries except graphics is specified, as eXpl0it3r already said. Judging by the unresolved externals, you might also need to link against user32. Add sfml-graphics-s-d and user32 to your linker libraries and see if that helps.

On a side note, this is something that would get made more explicit in the tutorial when the static linking is changed ;).
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 17, 2013, 01:47:09 am
Sorry, that was a dumb mistake. Should've caught that. I get this error now:
1>------ Build started: Project: SFML, Configuration: Debug Win32 ------
1>  Microsoft (R) Incremental Linker Version 10.00.30319.01
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  "/OUT:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe" "/LIBPATH:C:\Users\Cameron\Desktop\SFML-2.0\lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" "sfml-network-s-d.lib" "sfml-audio-s-d.lib" "sfml-graphics-s-d.lib" /MANIFEST "/ManifestFile:Debug\SFML.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.lib" /MACHINE:X86 Debug\main.obj
1>sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsA@12 referenced in function "public: static class std::vector<class sf::VideoMode,class std::allocator<class sf::VideoMode> > __cdecl sf::priv::VideoModeImpl::getFullscreenModes(void)" (?getFullscreenModes@VideoModeImpl@priv@sf@@SA?AV?$vector@VVideoMode@sf@@V?$allocator@VVideoMode@sf@@@std@@@std@@XZ)
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: __thiscall sf::priv::WglContext::WglContext(class sf::priv::WglContext *)" (??0WglContext@priv@sf@@QAE@PAV012@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "public: virtual __thiscall sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QAE@PAUHWND__@@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "public: __thiscall sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int)" (??0WindowImplWin32@priv@sf@@QAE@VVideoMode@2@ABVString@2@I@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DestroyIcon@4 referenced in function "public: virtual __thiscall sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UAE@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "protected: virtual void __thiscall sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function "public: virtual class sf::Vector2<int> __thiscall sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@H@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setPosition(class sf::Vector2<int> const &)" (?setPosition@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@H@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "public: virtual class sf::Vector2<unsigned int> __thiscall sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UBE?AV?$Vector2@I@3@XZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setSize(class sf::Vector2<unsigned int> const &)" (?setSize@WindowImplWin32@priv@sf@@UAEXABV?$Vector2@I@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UAEXABVString@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SendMessageA@16 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CreateIcon@28 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UAEXIIPBE@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCursor@4 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: virtual void __thiscall sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UAEX_N@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::registerWindowClass(void)" (?registerWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::registerWindowClass(void)" (?registerWindowClass@WindowImplWin32@priv@sf@@AAEXXZ)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsA@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::switchToFullscreen(class sf::VideoMode const &)" (?switchToFullscreen@WindowImplWin32@priv@sf@@AAEXABVVideoMode@3@@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__TrackMouseEvent@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__ScreenToClient@8 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "private: void __thiscall sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned int,long)" (?processEvent@WindowImplWin32@priv@sf@@AAEXIIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__MapVirtualKeyA@8 referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned int,long)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@IJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2019: unresolved external symbol __imp__CallWindowProcA@20 referenced in function "private: static long __stdcall sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned int,long)" (?globalOnEvent@WindowImplWin32@priv@sf@@CGJPAUHWND__@@IIJ@Z)
1>C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe : fatal error LNK1120: 35 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Should I just start a new project at this point?
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Laurent on October 17, 2013, 07:55:05 am
Unresolved external symbol "xxx" --> Google "xxx" --> find documentation about function "xxx" --> see in which library it is defined --> link it ;)
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: binary1248 on October 17, 2013, 10:21:58 am
As an example of what Laurent already said:

__imp__EnumDisplaySettingsA@12

Strip trailing name mangling information like @XY

__imp__EnumDisplaySettingsA

Strip leading import decoration

EnumDisplaySettingsA

Strip trailing string width declaration (A or W) if present, in simple terms, make sure the last letter is not an A or W

EnumDisplaySettings

Googling EnumDisplaySettings brings you here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd162611%28v=vs.85%29.aspx

If you scroll down to where it says Library you will see it is in User32.lib. So add User32.lib to your project link libraries. Do this until the linker is happy.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 19, 2013, 01:51:45 am
I added user32.lib and I get this now.
1>------ Build started: Project: SFML, Configuration: Debug Win32 ------
1>  Microsoft (R) Incremental Linker Version 10.00.30319.01
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  "/OUT:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe" "/LIBPATH:C:\Users\Cameron\Desktop\SFML-2.0\lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" "sfml-network-s-d.lib" "sfml-audio-s-d.lib" "sfml-graphics-s-d.lib" user32.lib /MANIFEST "/ManifestFile:Debug\SFML.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.lib" /MACHINE:X86 Debug\main.obj
1>sfml-window-s-d.lib(GlContext.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(GlContext.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(GlResource.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(GlResource.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickManager.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(JoystickManager.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(VideoMode.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(VideoMode.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(Window.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(Window.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WindowImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WglContext.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(JoystickImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(VideoModeImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : warning LNK4099: PDB 'sfml-window-s-d.pdb' was not found with 'sfml-window-s-d.lib(WindowImplWin32.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-window-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Clock.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Clock.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Err.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Err.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Lock.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Lock.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Mutex.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Mutex.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Sleep.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Sleep.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(String.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(String.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocal.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ThreadLocal.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(Time.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(Time.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ClockImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ClockImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(MutexImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(MutexImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(SleepImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocalImpl.cpp.obj) : warning LNK4099: PDB 'sfml-system-s-d.pdb' was not found with 'sfml-system-s-d.lib(ThreadLocalImpl.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-system-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Color.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Color.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(GLCheck.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Image.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Image.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(ImageLoader.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderStates.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(RenderStates.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(RenderTarget.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderWindow.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(RenderWindow.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Shader.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Texture.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Texture.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(TextureSaver.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(TextureSaver.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Transform.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Transform.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Transformable.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Transformable.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(View.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(View.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Vertex.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Vertex.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(Shape.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(Shape.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(CircleShape.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(CircleShape.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>sfml-graphics-s-d.lib(VertexArray.cpp.obj) : warning LNK4099: PDB 'sfml-graphics-s-d.pdb' was not found with 'sfml-graphics-s-d.lib(VertexArray.cpp.obj)' or at 'C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\sfml-graphics-s-d.pdb'; linking object as if no debug info
1>  SFML.vcxproj -> C:\Users\Cameron\documents\visual studio 2010\Projects\SFML\Debug\SFML.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 

Am I finished? It says 1 succeeded and 0 failed, but I didn't see a small window pop up and disappear like the program was supposed to do...
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 19, 2013, 02:03:00 am
We don't know what you were compiling so we can't magically guess why it's not behaving correctly.  In fact, we don't even know if you ran the program (maybe you just compiled it and stopped there!) so go check that.

If it's actually not working, then post the code, possibly in a new thread.
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Betaserver on October 19, 2013, 02:11:31 am
If you had looked at the original post, you would've seen the code I'm trying to run. But you are right, I was just building it and forgot to even run it  :P Sorry. And thanks a ton for your help! You guys are legends  ;D
Title: Re: MSVC++ 2010 fatal error LNK1112: module machine type 'x64' conflicts with target
Post by: Ixrec on October 19, 2013, 02:27:13 am
I didn't feel safe assuming you left the code 100% intact over the course of that much trial and error. =P