From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19457 invoked by alias); 15 May 2002 18:36:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19416 invoked by uid 71); 15 May 2002 18:36:01 -0000 Resent-Date: 15 May 2002 18:36:01 -0000 Resent-Message-ID: <20020515183601.19411.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, chorns@users.sourceforge.net Received:(qmail 15785 invoked by uid 61); 15 May 2002 18:29:40 -0000 Message-Id:<20020515182940.15784.qmail@sources.redhat.com> Date: Wed, 15 May 2002 11:36:00 -0000 From: chorns@users.sourceforge.net Reply-To: chorns@users.sourceforge.net To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/6665: Import library order does matter X-SW-Source: 2002-05/txt/msg00427.txt.bz2 List-Id: >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==