This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: static library in linux and Cygwin
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com, chenxiaof at is dot iscas dot ac dot cn
- Date: Mon, 12 Jun 2006 07:15:35 -0600
- Subject: Re: static library in linux and Cygwin
- References: <000801c68dd2$00014690$ab01a8c0@loiscxf>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to cxf on 6/11/2006 9:40 PM:
> Hello,everyone:
> I compile the static library in cygwin just like in linux,but when I
> link my program with the Library, it did not find the function included
> in the library. Are there any difference between linux and cygwin when
> using and compiling the static library.
Details, please. What link line did you use, and what was the error?
Most likely, you made the rookie mistake of not listing the -l options
last. Linux allows lazy linking, where symbols can be undefined if not
found at link time (which is what happens if you list the -l first), but
Windows .dlls are not so forgiving.
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEjWj384KuGfSFAYARAod9AKCF1FQh5JiF0ZkdxtF3Y0RSkfNhTQCfdzvW
KlfUbgwEm0bFo99oWegXmBE=
=4gDd
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/