Why is dos() crashing my executable?

1 次查看(过去 30 天)
James
James 2014-7-2
I'm using a MATLAB script to run a standalone executable I wrote (C++) several times, each time with different inputs. This has been working perfectly up until the point I updated my standalone executable with parallelized code. Now, both the dos() and system() functions will cause my executable to crash immediately, whereas it runs fine when called outside of MATLAB.
I've even tried writing a "middleman" executable, which is called by the MATLAB script and in turn calls the parallelized executable, but I see the same behavior. What is it about the way MATLAB calls external programs that causes a program that functions perfectly well on its own to crash the moment it's called?
PS - if you want to see an example of C++ code that causes this behavior, I've posted some here.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 C Shared Library Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by