mclTerminateApplication() destroys rest of C-application
이전 댓글 표시
Hello! I have a question about calling mclTerminateApplication() function. I have compiled Matlab C shared library. For library calls I have created my own wrapper functions. Then I initialize Matlab library with calls to mclInitializeApplication() and my library init function, then perform Matlab calculation, then terminate library and next call to mclTerminateApplication().
After this point still I have to do some job in C application. but it hangs up. printf() does not print, getch() never returns.
Documentation states clearly that Matlab function call are prohibited after mclTerminateApplication(). How about regular C code? Is it allowed? Is it absolutely necessary to call mclTerminateApplication() at the very end of C-program?
Thanks in advance
답변 (1개)
Kaustubha Govind
2012년 7월 24일
0 개 추천
AFAIK, you should be able to run generic C code after mclTerminateApplication(). Have you tried setting a breakpoint in your code after the call to mclTerminateApplication to make sure that mclTerminateApplication returns?
댓글 수: 3
rrlagic
2012년 7월 25일
Kaustubha Govind
2012년 7월 25일
rrlagic: Do you think that the MCR could have somehow hijacked stdout/stdin? Sorry, I don't have much to offer here - perhaps you should try contacting MathWorks Tech Support?
rrlagic
2012년 7월 26일
카테고리
도움말 센터 및 File Exchange에서 Deploy to Java Applications Using MWArray Data API에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!