How to set up c++ mex at matlab 2010b

I would like to use a s-fuction which programed by c++. Actually, this C++ s-function doesn't have a problem because S-function used the previbous project and it didn't changed.
I'd like to use this S-function at my laptop. I installed matlab 2010b and Window7.
I tried to set up the mex complier at matlab and installed C compliers, Visual C++ 2010 and 2008.
I run the command( >> mex -setup ) and selected a C++ complier but my matlab doesn't work.
When I compiled the s-function program, I saw below error.
>> mex yaskawa.c yaskawa.c(25) : fatal error C1083: Cannot open include file: 'simstruc.h': No such file or directory
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'yaskawa.c' failed.
??? Error using ==> mex at 208 Unable to complete successfully.
Please let me know the solution. Thank your very much.

回答 (2 件)

Jan
Jan 2011 年 9 月 22 日

0 投票

The error message is:
Cannot open include file: 'simstruc.h'
This does not look like there is a problem with the compiler, but that this file cannot be found. Is it in the current folder?
Kaustubha Govind
Kaustubha Govind 2011 年 9 月 23 日

0 投票

This looks like Bug #661855. There is a patch attached to the bug report that should fix the issue.

カテゴリ

ヘルプ センター および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

質問済み:

2011 年 9 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by