I’m attempting to make an x64 build of a project with Visual Studio 2005. It’s currently failing with linker error C1905, ‘Front end and back end not compatible (must target same processor).’
From what I gather, this is essentially saying that my x64 build is attempting to link with x86 modules. Unfortunately, this project links with a lot of different libraries. I’m not sure which is the one causing the problem.
Is there any way to get more information out of Visual Studio?
First, check Configuration Manager (Build > Configuration Manager…) to ensure that you’re building all of your projects for the same platform.
If that doesn’t help, then from the Visual Studio Command Prompt (available from the Start menu), you can use
dumpbinto determine the architecture of your .lib and .obj files by doing the following:The first line under the header values tells you which architecture the .lib/.obj was compiled for (in this case, x86).
If you have a lot of linked intermediates, you could automate this a bit by just looking for x86 (or x64) files:
for /R %f in (*.obj *.lib) do @echo %f && dumpbin /headers %f | findstr /c:"machine (x86)"