How to use mex for C functions on MATLAB 7.10?
이전 댓글 표시
Hi. I have some of my own code developed for MATLAB R2007 which calls my own C function, which has been running fine for years. On MATLAB 7.10, running on Windows 7 (64-bit PC), I recompiled the C function with mex and got a .mex64 file. However MATLAB crashes when it reaches that point in the code. Using mex -setup I only get the Microsoft Visual 2008 compiler as an option and none of the built-in compilers that older MATLAB versions had. Is there some special setup of Visual Studio 2008 I should use? Or some other trick with mex? Can anyone help me please? Thanks.
답변 (1개)
Friedrich
2011년 8월 14일
0 개 추천
Hi,
you moved from 32bit to 64bit. Beware that the size of some datatypes changes. The best way here is to debug your mex file:
This will help you to figure out in which line your mex file crashes.
카테고리
도움말 센터 및 File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!