c++linuxgccwolfram-mathematica

CMake built program does not show console


I am creating a plugin executable that is installed in another program (in this case it is a Mathematica plugin that will be installed into Mathematica, but I am not sure if this matters).

I created the project using CMake. However, in the past, when I would create this program, a console was shown. Now, I cannot get the console to show up anymore, which makes debugging really hard.

I've read about the -mwindows flag, which should do the opposite (i.e. hide the console window), but using this flag leads to:

g++: error: unrecognized command-line option ‘-mwindows’".

For the rest, I cannot find anything related to Linux (just about any post I can find is about hiding the console window on Windows).

Where do I look further, or how do I make this window show up?

System:


Solution

  • HolyBlackCat said:

    I don't think Linux has a concept of automatically opening a terminal window when a program starts. That's a Windows thing (where it's configured at link time via -mwindows). You can try running the whole Mathematica from a terminal, maybe your output will be printed there too.

    Using that, I managed to get my output the way I wanted. I think my memory got clouded over the course of time, perhaps I only automatically saw the console on Windows. Anyway, starting Mathematica from the terminal does show the output.