Yes, there is.

If anyone reading is interested you need to add this to the compile command:

-Wl,-subsystem,windows


Regards.