Windows Mex C function calling system() opens and closes windows. Is there a way to stop this?
조회 수: 9 (최근 30일)
이전 댓글 표시
Using Windows 7 or 10. I am calling a C++ Mex function from Matlab. In this Mex function I am calling the C system() function to run OS commands. Each time system() is called, a Windows cmd window opens and then closes very quickly. Since the Mex function is called many times, it is difficult to do anything else while this is happening.
Is there a way to suppress the opening of the window?
댓글 수: 0
답변 (1개)
Harsha Phadke
2016년 10월 4일
Hey Mike,
I suspect that the Windows Command Prompt is being opened by the C system() call upon execution.
Could you post the exact OS command you are using in the system call? This might help in understanding the cause of this behavior for the Windows Command Prompt.
It could also help to look at the following links that suggest the ways to avoid this behavior.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!