Skip to main content


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 10:16 Go to next message
James is currently offline JamesFriend
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 06:47 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
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: Fri Apr 19 02:32:51 GMT 2024

Powered by FUDForum. Page generated in 0.01979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top