public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: chorns@users.sourceforge.net
To: gcc-gnats@gcc.gnu.org
Subject: c/6665: Import library order does matter
Date: Wed, 15 May 2002 11:36:00 -0000	[thread overview]
Message-ID: <20020515182940.15784.qmail@sources.redhat.com> (raw)


>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==


             reply	other threads:[~2002-05-15 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15 11:36 chorns [this message]
2002-05-16 19:08 rth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020515182940.15784.qmail@sources.redhat.com \
    --to=chorns@users.sourceforge.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).