I have a need for integrating/running C++ code in Mathematica. To this extend I've been using MathLink, and now since sth like 10 years WSTP. I have created tooling for using C++ the C code in the context of C++ concepts. This all works fine, and I am very happy with the abilities of WSTP.
There is a bit of an issue though, and that is with outputting debugging output for the code. When I was using MathLink, installing an executable would spawn a terminal onto which I can stream text using std::cout and std::cerr. Since I've been using WSTP, I have not been able to spawn the terminal to output text messages. I have created functions to print to the notebook, and these do work at times, but it comes with interpretation of the notebook frontend. Does anybody know how to turn on the terminal as a separate window?
My setup:
- Linux Mint (fully updated to the latest version)
- QtCreator with CMake
- FindMathematica.cmake
- Mathematica 14.0
- WSTP interface 4
RemoteEvaluate[$Version]
, if I run it several times (immediately after the last run results), wstp will report an error..And don't expect to useImport["/home/yode/img.jpg"]
to import image from remote server Ifimg.jpg
is larger than 2M $\endgroup$