From: ebritten AT uci DOT edu (Eric Britten) Subject: Re: Date / Time Stuff.. 5 Sep 1997 21:13:18 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <340C6E33.EBD352E.cygnus.gnu-win32@uci.edu> References: <3 DOT 0 DOT 32 DOT 19970828205419 DOT 007a5e10 AT wilmington DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.01 [en] (Win95; I) Original-To: Keet / Foxbird Original-CC: gnu-win32 AT cygnus DOT com X-Priority: 3 (Normal) Original-Sender: owner-gnu-win32 AT cygnus DOT com Keet / Foxbird wrote: > I tried compiling some 'out-of-the-box' examples from a learn C++ > guide and > I get a really nice error that looks like this: > > C:\WINDOWS\Desktop\fb5.56\test\c++tutor\source>c++ -g -O -o date > date.cpp > C:\gnuwi > 32\b18\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-97040 > 4\.. > /../ > ./../i386-cygwin32\lib/libcygwin.a(libcmain.o)(.text+0x1e):libcmain.cc: > > und > efined reference to `WinMain AT 16' > C__~1.EXE: Internal compiler error: program ld got fatal signal 1 > > Am I missing a library, an environment setting or something along > those > lines? I've compiled other date stuff before, but this is the first > one > that doesn't work. If you need the source, just ask, I've got it > available. > This can happen when you are missing a main() function in your program. If you are then gcc and ld will link a default main() that calls WinMain. This is so people who write windows programs can compile them using gcc/g++. Hope this helps. Eric Britten > - Greg Neujahr > - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".