From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: tjoen@dds.nl Cc: cygwin@sourceware.cygnus.com Subject: Re: Libraries not working Date: Sun, 04 Jul 1999 17:51:00 -0000 Message-id: <199907050050.TAA20237@mercury.xraylith.wisc.edu> References: <199907040919.LAA16704@localhost.localdomain> X-SW-Source: 1999-07/msg00064.html tjoen@dds.nl writes: > > /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-mi > ngw32/lib/libmingw32.a(main.o)(.text+0x7b): > > undefined reference to `WinMain@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 > > > Also I have a main function and the FAQ says that if you > > get the undefined reference to `WinMain@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 I believe you're referring to the problem that shows up when linking V GUI examples, which puts WinMain in a library. The solution there is to use -Wl,-u,_WinMain@16 when linking (in addition to -mwindows). I don't have enough information on this particular problem to be able to comment. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: tjoen@dds.nl Cc: cygwin@sourceware.cygnus.com Subject: Re: Libraries not working Date: Sat, 31 Jul 1999 18:34:00 -0000 Message-ID: <199907050050.TAA20237@mercury.xraylith.wisc.edu> References: <199907040919.LAA16704@localhost.localdomain> X-SW-Source: 1999-07n/msg00064.html Message-ID: <19990731183400.72BkjYEysVOn4Hi9t31Mnf7KvzyOicz-5dYTJSU3T5w@z> tjoen@dds.nl writes: > > /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-mi > ngw32/lib/libmingw32.a(main.o)(.text+0x7b): > > undefined reference to `WinMain@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 > > > Also I have a main function and the FAQ says that if you > > get the undefined reference to `WinMain@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 I believe you're referring to the problem that shows up when linking V GUI examples, which puts WinMain in a library. The solution there is to use -Wl,-u,_WinMain@16 when linking (in addition to -mwindows). I don't have enough information on this particular problem to be able to comment. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com