0

I am compiling my GTK4 application on MacOS using clang or gcc-12 compiler using:

clang (or gcc-12) `pkg-config --cflags gtk4` ./src/main.c `pkg-config --libs gtk4` -o ./bin/iViewGtk

Unfortunately, when I run the application, it opens the main window, but also a terminal like this:

enter image description here

How to compile the application in a way that it doesn't open the terminal when the application is launched?

I saw that there is a linker option: -mwindows, but it seems that it works only for Windows?

I am getting:

gcc-12: error: unrecognized command-line option '-mwindows'

Maybe, I am using it incorrectly?

Could someone tell me how to compile the app to get rid off the terminal window?

Thank you.

1 Answers1

0

You have a couple of options though running the application as a daemon would be best for you. As for daemons, they only run in the "background" of your computer. You can use launchd which allows for daemon management.

NotAidan
  • 45
  • 5