matlab 2011b 64 bit compiler mess
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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!
0 Commenti
Risposte (2)
Friedrich
il 3 Nov 2011
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.
0 Commenti
Jan
il 3 Nov 2011
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 Commenti
Jan
il 3 Nov 2011
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.
Vedere anche
Categorie
Scopri di più su C Shared Library Integration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!