any help here would be appreciated. Ive really racked my brains at this, sooo.
I have installed cygwin, and Netbeans and have been successfully deving, compiling and run
For a library that I just built with Cygwin, I added the following compiler flags:
-shared -Wl,--out-implib,lib$(LIB_NAME).dll.a
This allowed me to build my library without the dreaded, "missing WinMain," error message.
Have you tested with an #undef main infront of your main?
/*
* If 'main' is defined we clear that definition
* to get our default 'main' function back.
*/
#ifdef main
# undef main
#endif /* main */
int main(int argc, char** argv)
{
// ...
return 0;
}
Using Netbeans with Cygwin and SDL, including SDL.h creates strange error
May also help:
I get "Undefined reference to 'WinMain@16'"
Under Visual C++, you need to link with SDL2main.lib. Under the gcc build environments including Dev-C++, you need to link with the output of "sdl-config --libs", which is usually: -lmingw32 -lSDL2main -lSDL2 -mwindows
( http://wiki.libsdl.org/FAQWindows#I_get_.22Undefined_reference_to_.27WinMain.4016.27.22 )