From: Earnie B. <ea...@us...> - 2009-10-29 13:49:04
|
Quoting Andrew Fleenor <and...@sb...>: >> >> C:/Dev-Cpp/lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined >> reference to `WinMain@16' >> collect2: ld returned 1 exit status >> > > Make sure your main function has the signature int main(int, > char**). I think I've gotten similar errors by declaring "int > main()". The problem is that SDL #defines "main" to SDL_main, then > calls it with the original arguments that it got from the real > main(). Since your "main" is not the real main, it doesn't get the > same flexibility as the real main in its arguments. > How is correcting main() going to provide a reference for WinMain()? Did you notice the -mwindows in the command? That will require WinMain() and not main(). > I don't remember for sure if that's the error I got when I did this. > Google is great for looking up error messages. > It may benefit the list if the responder were to do so before responding. The resolution to the problem is, don't provide -lmingw32 on the command line. -- Earnie |