How are you calling those external tools? You can use QProcess to call them and intercept their output. Then you can do with it whatever you want.
How are you calling those external tools? You can use QProcess to call them and intercept their output. Then you can do with it whatever you want.
Hi, thanks for your reply.
As far as I understood QProcess, I can use it for external tolls that are called as external executable.
I have a library written in Fortran with a C++ interface that I included in my code and use its function in my code... this functions produce outputs that are not redirected to the GUI. Any idea how can I solve the problem? Maybe the problem is it is Fortran code and doesn't have std::cout?
Thanks for your help,
Annalisa
It surely doesn't have std::coutMaybe there is some native API that will help you intercept STDOUT from those libraries but the chances are slim. On a POSIX system you could probably use dup2() and pipe2() to create a pipe from stdout that you could read but I am just guessing.
An alternative is to replace the symbol used by the library to print output to stdout with a custom function that will redirect it elsewhere but this requires knowledge of how the fortran engine works.
thank you very much for your time and your help.
I'll investigate more in the direction you suggest!
Regards
Annalisa
Bookmarks