Whenever I create a new project in Visual Studio 2010 and don't set the specific platform (in my case x64) at first, I won't be able to completly change it afterwards.
So I setup everything a need with an external library (compiled as x64) and then press compile it obviously fails since the two platforms do not match.
sfml-graphics-s-d.lib(RenderStates.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Noticed that I change it to x64 with Build->Configuration-Manager->Active projectplattform->New…->x64. That's the same thing I'd do before doing anything else and it works, but if I do it afterwards I get the linker error:
libcpmtd.lib(uncaught.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
The *.obj file can change from project to project (e.g. cout.obj) and from my understanding Visual Studio picks the x86 standard library and doesn't change it's decision after I've switched the platform.
So for the question: How do I force VS to use the new specified x64 platform – also for the standard library?
Note: Creating a new configuration setup will automatically change the linker setting for the target machine to: MachineX64 (/MACHINE:X64)
Note: Not sure if it's relevant but I'm linking the runtime library statically Multithreaded-Debug (/MTd)
Best Answer
If anyone would ever run into the same problems as I did, he can find the discussion and solution over at the MSDN 'forum'.