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 Center および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by