X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CA1B3858408
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1689058062;
	bh=QdE2uBTMn6OqQ9ec96TKF3gyrTBarUcyDKD04wM+nuc=;
	h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
	 List-Help:List-Subscribe:From:Reply-To:From;
	b=k5ufaTxJd8TQnjdOmkiXum1k1M3TveGegioQonwIWqEWWaz4IGEXWevYWcwOPG1aB
	 W8MER0BI6rUgmSp1Pft1fpn/onBy/Vo7d+fP2ydtg/4YrTWThVlNO+fASHdABfq7xQ
	 EaRfk++cltSdk/n6PLJp5zBoD1oRZ/44SVi0SwR0=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A98D13858CDA
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1689058045; x=1691650045;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=tCciishxYFMA3AGHKyItT9MwlQlZjsQRBiDeS7XG2PQ=;
 b=CriUbWIxBmE864vrTL03sXw+IPBlxbkWXiLjXAU1JmGBKfH67SWy5Bsm4GIrmi5n0b
 F8YLOeFLPthz21IZrOn9kqVTEOePS22e87knQf/92QNM2hFfHrPrUx6+Z7vp/EzHo4+D
 OBwTHqsW2XKzYAknPbymCfoYVY5AncFt6WB2QfjC22FztDR30jmi3Sl5CCSH87qBzHiW
 nr6F5fKmhassWEVjt6GQ+ZKBN3MsDBIfQyvIKPU2WWJDCD8Z+2cuoMwwstDEbDi/Wbx/
 7ijTOeLCvUv1xSUJlJKxwh3gvRP4BA2PlgnUZIV+qd5fA/7Gjn72Gtz6oc0/ExHRomn0
 iY7Q==
X-Gm-Message-State: ABy/qLb2Rom1xtHaTtdn1kBJ4JxprNNZwglX3aixT6BweEaCkXJZhhzg
 zVNFrx9Cqk+eCyceWzFa07pbVARXgfogF+xgGAA7/Adx7K2v4w2E
X-Google-Smtp-Source: APBJJlFQBu/veyM1YG+HUSELHZmIybs2SV6HDJ9heCNrN6wnlwwXzcQfSSF0fn/f1BAIHzuY+8nOkd56ZLx1TQNB0kk=
X-Received: by 2002:a50:fa94:0:b0:51d:e2ee:33ff with SMTP id
 w20-20020a50fa94000000b0051de2ee33ffmr18897845edr.7.1689058045070; Mon, 10
 Jul 2023 23:47:25 -0700 (PDT)
MIME-Version: 1.0
Date: Tue, 11 Jul 2023 09:47:14 +0300
Message-ID: <CAPxKPA4KfwWUa4pgEBuN=3ZDTYLP2QNGNo39nKhUtXFF_zGQ2A@mail.gmail.com>
Subject: Linking a native msvc dll library to CYGWIN g++ compiler
To: cygwin@cygwin.com
Content-Type: multipart/mixed; boundary="000000000000c84423060030788f"
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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin@cygwin.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@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: =?utf-8?q?M=C3=BCmin_A=2E_via_Cygwin?= <cygwin@cygwin.com>
Reply-To: =?UTF-8?B?TcO8bWluIEEu?= <muminaydin06@gmail.com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

--000000000000c84423060030788f
Content-Type: text/plain; charset="UTF-8"

Hi,

I'm facing a problem while linking my native dll library into the g++
compiler.

There is a name mangling problem when calling a msvc function from g++
compiler therefore linker gives an error undefined reference.

Is there any method to directly link and call a function from native dll
library from the cygwin compiler ?



For example, I've a fooCls.h header file for a windows library,  I add link
the fooCls.dll to g++ compiler then,

fooNameSpace::fooConnectionCls instance;
instance.FooTest();

gives a linker error , undefined reference.


Thank you in advance,
Mumin AYDIN

--000000000000c84423060030788f
Content-Type: text/plain; charset="US-ASCII"; name="fooCls.h"
Content-Disposition: attachment; filename="fooCls.h"
Content-Transfer-Encoding: base64
Content-ID: <f_ljxxdmxh0>
X-Attachment-Id: f_ljxxdmxh0

I2lmbmRlZiBGT09DTFNfSA0KI2RlZmluZSBGT09DTFNfSA0KDQojaWYgZGVmaW5lZChfV0lOMzIp
DQojaWZkZWYgRExMX0VYUE9SVA0KI2RlZmluZSBfV0lOX0RMTCBfX2RlY2xzcGVjKGRsbGV4cG9y
dCkNCiNlbHNlDQojZGVmaW5lIF9XSU5fRExMIF9fZGVjbHNwZWMoZGxsaW1wb3J0KQ0KI2VuZGlm
DQojZWxzZQ0KI2RlZmluZSBfV0lOX0RMTA0KI2VuZGlmDQoNCm5hbWVzcGFjZSBmb29OYW1lU3Bh
Y2UNCnsNCg0KICAgIGNsYXNzIF9XSU5fRExMIGZvb0Nvbm5lY3Rpb25DbHMNCiAgICB7DQogICAg
cHVibGljOg0KICAgICAgICB2b2lkIEZvb1Rlc3QoKTsNCiAgICB9Ow0KDQp9DQoNCiNlbmRpZiAv
LyBGT09DTFNfSA==
--000000000000c84423060030788f
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


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

--000000000000c84423060030788f--
