Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37811359.4108B635@visi.net> Date: Mon, 05 Jul 1999 16:19:37 -0400 From: John Garrison X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Libraries not working Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am sorry about responding to your help via personal email, the other lists I have been on sent the message to the list when you reply. Maybe you emailed to me instead of the list and I didn't bother to look, sorry. Anyhow here is my reply to those in the list who might be able to help. By the way I am using a Linux version of the compiler, but it is a cross-compiler so It outputs Windows executables. > > /tmp/cciFT7S1.o(.text+0x103):show.c: undefined reference to > > `IMG_Load_RW' > > /usr/win32/bin/../lib/gcc-lib/i586-mingw32/egcs-2.91.57/../../../../i586-mingw32/lib/libmingw32.a(main.o)(.text+0x7b): > > undefined reference to `WinMain AT 16' > > collect2: ld returned 1 exit status > > > > IMG_Load_RW is clearly defined in IMG.h which is included in the show.c > > source code. > > I guess that it is only declared, not defined > IMG_Load_RW is a function, it can't help but be defined. Well, I guess it is possible to not define a function, but this is is defined. Besides it compiles fine for Linux. > > > Also I have a main function and the FAQ says that if you > > get the undefined reference to `WinMain AT 16' to include a blank main > > statement, well, I am not building a library I already HAVE a main > > statement. > > One solution: link with WinMain.o > The other was explained by Mumit Khan in a posting May 13 > WinMain.o? Is that part of the distribution or do I have to create an empty WinMain() source file? By the way, does anybody know why Windows decided to completely screw up portabilty with this WinMain function in the first place? What is wrong with the main() statement we have been using since like 1972 when the language was invented? -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com