c++ - How can I see the output from printf's that are called from a DLL used by a Mex function in Matlab? -


i have mex code calls functions dll. dll has bunch of printf statements scattered around useful debugging. however, cannot see output in matlab command window. i've done reading , apparently because command windows not treated console application output printf can sent. have tried using link's solution no avail. have access source code of dll. compiling windows 7 in visual studio 2010. have tried using cout , works; however, not want rewrite of functions use cout. there can redirect output of printf matlab's command window?

you need call setstdhandle before dll loads , initializes runtime library. can attach write end of pipe, , read other end.

once runtime library initializes, have global data tied original stdout handle, , may not affected future calls setstdhandle.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -