|
From: Andrew F. <and...@sb...> - 2010-01-07 19:42:57
|
> From: C. Marcano <cos...@gm...> > Subject: [Mingw-users] Undefined reference to WinMain@16 > > Hi, everybody: > I am just starting to use cygwin/gcc/mingw environment. So, I am > a novice. > I am tryng to compile a simple C++ program, with g++. It compiles > without error, but when I try to 'g++ -o test test.o', the linker reports: > "Undefined reference to WinMain@16" Depending on what library you are using, you might need to make sure that your main function has exactly the right signature, ie. int main(int, char**). You definitely need to be careful of this if you use SDL. |