Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C++ beginner problem
C++ beginner problem [message #634768] Sat, 23 October 2010 06:16 Go to next message
James is currently offline James
Messages: 1
Registered: October 2010
Junior Member
Hi everyone,

I just started using eclipse for c++ and MinGW and i'm trying to complete a project but I ran into an error and I can't seem to fix it.
Any help would be greatly appreciated.

c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../libmingw32.a( main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Build error occurred, build is stopped

Thanks
Re: C++ beginner problem [message #634912 is a reply to message #634768] Mon, 25 October 2010 02:47 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
You are trying to build a Windows GUI application and have no WinMain() function defined. Either create this function or if you want to create a console app remove the compiler flag
-mwindows


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:compile new, custom file types
Next Topic:Debug GDB
Goto Forum:
  


Current Time: Sat Jul 26 07:21:36 EDT 2014

Powered by FUDForum. Page generated in 0.01642 seconds