public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/6665: Import library order does matter
@ 2002-05-16 19:08 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-05-16 19:08 UTC (permalink / raw)
  To: chorns, gcc-bugs, gcc-prs, nobody

Synopsis: Import library order does matter

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Thu May 16 19:08:29 2002
State-Changed-Why:
    (1) The linker is in the binutils package, not gcc.
    (2) The linker is working as designed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6665


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/6665: Import library order does matter
@ 2002-05-15 11:36 chorns
  0 siblings, 0 replies; 2+ messages in thread
From: chorns @ 2002-05-15 11:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6665
>Category:       c
>Synopsis:       Import library order does matter
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 15 11:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     chorns@users.sourceforge.net
>Release:        Current CVS
>Organization:
>Environment:
Cross compile i386-mingw32msv from linux
>Description:
This has troubled me a couble of times before so I decided to make an example that illustrates the problem. If gcc builds an executable from a static library (or just a regular object file) that imports functions from a dynamic library, then gcc cannot resolve the imports from the import library if the import library is specified before the static library on the command line. E.g.

gcc -o myprogram.exe myprogram.o mydlibrary.a myslibrary.o

will not work, but 

gcc -o myprogram.exe myprogram.o myslibrary.o mydlibrary.a

will work.
>How-To-Repeat:
Run the attached example.
>Fix:
Put the import library last on the command line to gcc.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/gzip; name="libtest.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="libtest.tar.gz"

H4sIANWn4jwAA+1X32/aMBDmdf4rLHUPFDXF+T2t2sNWpqkSExOrtE3TNGWJYVGTuHIMpZr6v+8c
EjAQ4IXApvoTqu3c+c715bvcJfEvQXPRbTUIQhziuy6MBdbH+dx3fOJatk/MFjFNy7Zb2G3yUBUm
uQg4xi3OmNilt0/+nyIp458+5jDlAX+8DA/tg5iEeI6zNf6WZZfxN+GvB/q2R6wWJoc+SB2eefy7
HayGHhtY3ofAnS5CdCYoz/CUxREoRaXSz9EkC0XMsvb5FUKlMN8Uoj8Ib9v2hNCmY5pFhdtTX8mz
woL/wR0dxQltwsce/puW/DbM8z/8QM+0fJn/Nf+bxxmuIl9RH6Fev387GPTxGxzbrzwjjbPxg22l
+dSIkkQwlqAP19c10nEYIhQkyWv04mW7NHKODbkrC1KqJINLeCQFdLTyEJaGwSbifiIMeKjKAmkT
3IK9tNjMVCnDRqiuw6U2U9NMqZfX6OW/A06jNbvSk+pm1ew9Z2MepJXVahnWa9EZXdmj/nMrZ0To
DPcYzXHGBH5g/A7W2w2uGFGtKwZ37VfuZpsxeaAvcI58p6F636sxRGFCgwzeD57ijoxpMbJyhNsu
Z2BROlVeTfg46C9DA1jWf4vX9+A+9tZ/UlbWf+68/nMsT+f/Y6Aowxah31H+1VR4UP7FmQCWxllb
TgI+Di9wCIkUd+Ri+v1HVQXW7saYUzEBF2RZEapH0QVh81jyP/on+j/PJZL/LpSEmv9HQEG6qL7/
2974Aauf5uTvJcnHiv8z8wIXo1WOdjk68zSwyfZI938nRg3/oQw/rI99/Dcdf8l/X/Z/jkkczf9j
4GqjAau6wP7Nu+Hb4be1dgih918/DYa3n1FNYkCoxpyu3DU0NDQ0NDQ0NDQ0NDQ0NDROib8SJz9C
ACgAAA==


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-17  2:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-16 19:08 c/6665: Import library order does matter rth
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15 11:36 chorns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).