Image

Imageopenreel wrote in Imagecpp

using system() to launch an image viewer

When I use system() to launch another application, my C++ program is frozen in limbo until that application quits.

In my case, my program writes an image file to disk, and then when it's done launches an image viewer with that file as an argument, so I can see the image right away. Thus far I only know how to write terminal programs, not GUI programs, so this is the most convenient way for me right now.

I'm just wondering if there's a way to do this so that the program being launched is independent of my program, so mine can keep running, or give me the terminal screen back, without me needing to quit the image viewer.

Right now I'm doing this in OSX, which has a Unix core, but even if you only know how to do this on Windows/DOS or Linux, that might be enough put me on the right track.