0

I have an error when i compile on window10 simpleelastix library (https://simpleelastix.readthedocs.io/GettingStarted.html).

It's ok with the CMake step (compile with visual studio 15 2017 x64, but when i build on Visual Studio, i have this issue :

**

Determining if the C compiler works failed with the following output: Change Dir: C:/Users/gup/Dev/se/bin_7/Lua-prefix/src/Lua-build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_633ea.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 pour .NET Framework Copyright (C) Microsoft Corporation. Tous droits réservés.
Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27027.1 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_633ea.dir\Debug\" /Fd"cmTC_633ea.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\testCCompiler.c" testCCompiler.c cmTC_633ea.dir\Debug\testCCompiler.obj : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64' [C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\cmTC_633ea.vcxproj] Determining if the C compiler works failed with the following output: Change Dir: C:/Users/gup/Dev/se/bin_7/Lua-prefix/src/Lua-build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_77e83.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 pour .NET Framework Copyright (C) Microsoft Corporation. Tous droits réservés.
Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27027.1 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_77e83.dir\Debug\" /Fd"cmTC_77e83.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\testCCompiler.c" testCCompiler.c cmTC_77e83.dir\Debug\testCCompiler.obj : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64' [C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\cmTC_77e83.vcxproj] Determining if the C compiler works failed with the following output: Change Dir: C:/Users/gup/Dev/se/bin_7/Lua-prefix/src/Lua-build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_4aa90.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 pour .NET Framework Copyright (C) Microsoft Corporation. Tous droits réservés.
Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27027.1 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_4aa90.dir\Debug\" /Fd"cmTC_4aa90.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\testCCompiler.c" testCCompiler.c cmTC_4aa90.dir\Debug\testCCompiler.obj : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64' [C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\cmTC_4aa90.vcxproj] Determining if the C compiler works failed with the following output: Change Dir: C:/Users/gup/Dev/se/bin_7/Lua-prefix/src/Lua-build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_eeb4e.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 pour .NET Framework Copyright (C) Microsoft Corporation. Tous droits réservés.
Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27027.1 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_eeb4e.dir\Debug\" /Fd"cmTC_eeb4e.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\testCCompiler.c" testCCompiler.c cmTC_eeb4e.dir\Debug\testCCompiler.obj : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64' [C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\cmTC_eeb4e.vcxproj] Determining if the C compiler works failed with the following output: Change Dir: C:/Users/gup/Dev/se/bin_7/Lua-prefix/src/Lua-build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_96de8.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 pour .NET Framework Copyright (C) Microsoft Corporation. Tous droits réservés.
Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27027.1 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_96de8.dir\Debug\" /Fd"cmTC_96de8.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\testCCompiler.c" testCCompiler.c cmTC_96de8.dir\Debug\testCCompiler.obj : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64' [C:\Users\gup\Dev\se\bin_7\Lua-prefix\src\Lua-build\CMakeFiles\CMakeTmp\cmTC_96de8.vcxproj]

**

I was trying to build SimpleElastix for LUA.

Config : Visual, python, windows 10 are x64

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • The important part is this: "type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64'" Looks like there's a conflict with the architecture and you have to set it from x86 to x64 somewhere. – Blaze Mar 07 '19 at 14:49
  • For the link1112, please have a look at [this issue](https://stackoverflow.com/questions/3563756/fatal-error-lnk1112-module-machine-type-x64-conflicts-with-target-machine-typ). And according to the pic you provide, you use /p:Platform=Win32, this refers to you use X86 config to build the project. Please change it to X64 and give a try in VS to check if it works. – LoLance Mar 08 '19 at 07:10
  • Since you mentioned "Config : Visual, python, windows 10 are x64". Why the /p:platform=win32 instead of X64. Please check for your build configuration and a feedback would be expected. – LoLance Mar 08 '19 at 07:12
  • My mistake, it's not the correct output but i definitely set Release and x64 with visual when i did the build. And Cmake before. I installed by error and uninstalled Visual Studio with c++ module in x86, and after i install Visual x64. This may have keep cache or something like that? – GuillaumeP Mar 08 '19 at 14:02
  • It occurs with visual and msbuild. It 's the same if i build Lua with Visual. I tried several solutions with Lua on Visual, or command line, because i have the same error and the build is faster. – GuillaumeP Mar 11 '19 at 08:43
  • @GuillaumeP Glad to get your reply. I have just followed your link , and create Lua.exe in visual studio 2015. It works on my side, and also with vs2017. But cause I'm not familiar with python, what I do is follow the tutorial(compiling on windows in vs to step4, after that release mode build Lua project), so I'm not sure if python makes the difference. – LoLance Mar 11 '19 at 08:50
  • Add I've found a similar issue with your situation, hope you can get some help from [this issue](https://github.com/SuperElastix/SimpleElastix/issues/277). – LoLance Mar 11 '19 at 09:03
  • Thanks for your reply. I found my problem which was the last candidate release version of Cmake. It doesn't take my compiler or something like that. I reinstall the last release, and it's ok now :) – GuillaumeP Mar 12 '19 at 10:05
  • @GuillaumeP Hi friend, what's the version you use when the build failed. And the last CMake version you use to resolve it is 3.14.0? The cause of your issue is that cmake Version is not compatible with your other settings. Maybe you can share your details to an answer to help guys with similar issue :-) Thanks! – LoLance Mar 20 '19 at 06:05

0 Answers0