matlab 2011b 64 bit compiler mess

조회 수: 3 (최근 30일)
Miguel
Miguel 2011년 11월 2일
Hello,
I'm using Win 7 64 bit and Matlab 2011b 64 bit.
I'm having some issues that I believe are linked to the compiler. I developed this progrma on matlab 32 bits and Win xp 32 bit and when I try to run it on my machine I get:
Error using loadlibrary (line 421) Failed to preprocess the input file. Output from preprocessor is:edk.h C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\eh.h(26) : fatal error C1189: #error : "eh.h is only for C++!"
I have installed VS 2010 SP1 and Windows SDK 7.1 so I DO have a C++ 64 bit compiler but whenever I run mex -setup the only options at my dosposal are:
Select a compiler: [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0 [2] Microsoft Visual C++ 2010 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
[0] None
So, what am I doing wrong...?
thanks a lot!

답변 (2개)

Friedrich
Friedrich 2011년 11월 3일
Hi,
the loadlibrary command can parse C Syntax header files only. It seems that your DLL and header file use the eh.h which is for C++ only (that what the error states). You have to make sure that you have a pure C header file only.

Jan
Jan 2011년 11월 3일
I do not see the problem. You start "mex -setup" and see exactly the expected list. Which compiler do you choose now? [1] or [2]?
I'd prefer the SDK 7.1, because it "will be the supported free Microsoft tool chain going forward." ( roadmap for 2012a ).
Currently your problem description stops here. But when do the error appear?
  댓글 수: 2
Miguel
Miguel 2011년 11월 3일
but shouldn't I see on the list the 64 bit compilers as well?
Jan
Jan 2011년 11월 3일
The 64 bit compiler is called from inside MSVC 2010, which is a 32 bit application. I have selected the [1] with the exactly equal location and can compile mexw64 files without any problems.
Therefore I really assume, that thinking, that you've done anything wrong, is the only problem.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by