This is the mail archive of the
mailing list for the Cygwin project.
Re: Libraries not working
- To: email@example.com
- Subject: Re: Libraries not working
- From: Mumit Khan <firstname.lastname@example.org.EDU>
- Date: Tue, 6 Jul 1999 11:18:36 -0500 (CDT)
On Mon, 5 Jul 1999, John Garrison wrote:
> 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'
> > >
> > > 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
> > > 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.
This is your second post, but still no details. Without any details on
what you're doing, how you're linking, what options you're passing to GCC
and the linker, what files are being linked in, what language (C, C++),
how are we supposed to know what's wrong???
> > > 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
This is incorrect. There is no WinMain.o.
> 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?
WinMain() becomes the "entry" for GUI executables in Windows. As for how
the language has been changed under you on Windows, feel free to ask
Microsoft ;-) Of course, I hope folks have switched from the language
from 1972 to a much newer ANSI C, and soon to be C9x!
Want to unsubscribe from this list?
Send a message to email@example.com