delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/09/03/12:20:01

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 138B33848427
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1630685999;
bh=aW8kf8EvBH1kcEBrhHGR4Jk1OCNaKJnHOWsc2pAy/j0=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=u/PGJlc74o6NwEcQU2+scVrkI+Qy5b9LOjvo7p3HJ0i/orGXNAjU1hFVS9dkgsg0r
LT/x0tbnF3L1JuQaa2P4ssZUaYcMk8qNQ+MXxLfgbQS6kHqYUU1RjzncI6D6+cU7ik
aguS3lFtehndj6D0XICdfm8RaZR0SaFY1dTe0784=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 88CA33848415
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=45x9JjMy9Ws8PnCxfGZhRznzXb1wStF53eB3NJnntFI=;
b=gq4FvK544mnZv4nWe0nj11JFpzjLm5sVuMG2JB+lAl/or230C+vI3thHTfJjZ/PylT
Hjns/uWg2fU+yRPgmVL2lsH4m74pad08Z1ejp2yzw8b/6YYK47aNSIdURyRKCPwtnlw6
xCOSNPpLNCHNRj/c4yA47TMTz1E/biKXs3ZFenKLYefFw50wO5F4i3ZuP9ikFcYR4uDZ
IkLkYTg6kxbQvBpLuO5A397Afdc/nD/HcywQYeS204ObDa9IIJk+iVGAUTd/3KEaggh1
qir23WUkVA9vHfFbsUshJCGIbEa5oW8PU4fboaPjq029ZhyFtJRoO9oQpzwfEgREs/n2
3Kbg==
X-Gm-Message-State: AOAM533AXpFmrv050lwf2osITSv+St1UzTsVDbRj06e62Z2muJTl1I0X
Rm4Tpe6GHY0S60coTHFUdAtbsLshnVEiWItHqJyGKvRTmLY=
X-Google-Smtp-Source: ABdhPJxBd3uGbnJfLb5bCYZI+6RVJM1JAQDtWlicw0GbgEj/l+aPAKWuxdV8pe3mf/C5ghMg83XwdhQCc1pMk8+1yb4=
X-Received: by 2002:a05:6512:5d3:: with SMTP id
o19mr3329917lfo.470.1630685468813;
Fri, 03 Sep 2021 09:11:08 -0700 (PDT)
MIME-Version: 1.0
Date: Fri, 3 Sep 2021 13:10:59 -0300
Message-ID: <CAGc1aY-oHMoGc8B9DJVBc8RcxfWPv4g5tYB1foAcYN5PTEXr6A@mail.gmail.com>
Subject: About DLL compilation problem
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,
FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ricardo Santos Pereira via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ricardo Santos Pereira <arsoftware25 AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi Corina

just figured out that a .def file in a dll may export function from a dll
that is referenced in the compilation stage like this:

gcc file.c external.dll def.def -o out.dll

if in the def.def it has a function that is in the file.c and also
available in external.dll it may generate an invalid out.dll

I don't know but this looks like a problem in gcc that need to be fixed,
spend one hour modifying my function in file.c and it was linking with
external.dll

then I commented the function inside file.c and saw the compilation stage
finished without a link error

if it is a GCC feature then a warning about expernal DLL linkage could help
a lot when the function exported is inside an external DLL

hope to have explained it in an easy way

Ricardo

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019