If an admin could post it back in, I would appreciate it
«Hello, everyone. I am using "i686-w64-mingw32-g++ -Wall -masm=intel -mwindows <cpp file>" as a means to compile C++ code on Linux and run it on Windows/through WINE.
Using the EXACT code available on https://docs.microsoft.com/en-us/windows/win32/learnwin32/your-first-windows-program , however, does not even compile. It throws an error in linking stating that there is an undefined reference to WinMain. After playing with my code, I noticed that this error goes away when I both remove WINAPI, a macro used by Windows to enforce stdcall, and rename the entry function to just 'main'.
However, this leaves me with a number of warnings which seem to reflect the compiler expecting argc, argv, and envp, rather than the normal Windows entry function. And, while they are just warnings and a an exe PE32 for MS Windows is created, doing "wine <output file>" just leaves my terminal hanging, and running it in a Windows 10 Enterprise VM just does nothing.
Does anyone with experience in MinGW know why this is the case? How can I reach the desired outcome of the provided code? (Just opening a window)»