Problem solved. It was an error with Windows SDK 7.1. When installing you have to unclick the C++ tool kit and install and then download the update to fix the problem.
Compiler error
2 次查看(过去 30 天)
显示 更早的评论
Good Afternoon All,
I am having a problem when trying to run the compiler and have figured out it has something to do with VS2010 and matlab.
The error is: error lnk1112 module machine type 'x86' conflicts target machine type 'x64'
Error: An error occurred while shelling out to mbuild (error=2). Unable to build executable.
I cannot figure out how to change either setting and which setting I need to change. I have windows xp and the 64 bit version of both programs. Any help or suggestions are greatly appreciated.
Thanks!
0 个评论
采纳的回答
更多回答(1 个)
Kaustubha Govind
2011-12-7
Assuming that you have 64-bit Windows and 64-bit MATLAB, have you installed x64 compilers with your Visual Studio? By default, only the 32-bit compiler is installed - there is a checkbox during installation that you need to select to ensure that x64 Compilers are installed.
Once you have done this, run "mbuild -setup" and make sure that it automatically picks up the installed compiler.
1 个评论
Martin Gulan
2015-1-9
Dear Kaustubha and others;
when I run
>>mex work/obj_target/test.obj work/interface/test_mex.c -output test
I receive almost the same output, i.e.:
Building with 'Microsoft Visual C++ 2012 (C)'. Error using mex work/obj_target/test.obj: fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
on my x64-based machine with Win7_64bit, MATLAB2014a_64bit and Microsoft Visual Studio 2012 . Any advice here, please? I am trying to solve this for days and slowly runing out of time, hence I will appreciate any help a lot.
PS: Then I also get the same problem in Diagnostic Viewer (fatal error LNK1112:...) when trying to build my Simulink model (more precisely when Linking) for my target PC via Simulink Real-Time
Martin
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!