I'm trying to create a really simple one-window application that should update some files via http and want it to run on windows and ubuntu without changing the executable.
Obviously one could use a console application that launches the gui depending on the current system but i wondered if there was a more direct way but could not find any helpful information via google so far.
I know that a win32 program has a WinMain function, however i could not find any information if that was actually the start of the program or if there is a main function inside the part you include with the windows.h that does the initialization and then calls the WinMain so i could create my own main function handing over to the windows main function if the system is windows - trying the Visual Studio Search Function in the dependencies has lead to no results however.
Given that there actually is no main function - is there a way to let the program take WinMain under Windows and main otherwise as the starting point for execution? Or am i trying to work around some basic difference between these builds in the compiler, which won't go away anyway just because of a formal workaround?