From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 00EDA3858C60 for ; Thu, 21 Oct 2021 12:05:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00EDA3858C60 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 0AA2765EEB; Thu, 21 Oct 2021 08:05:00 -0400 (EDT) Message-ID: <9c61a693cd8fc6544787472482c31984c4a3114d.camel@mengyan1223.wang> Subject: Re: Re: GCC link problem help! From: Xi Ruoyao To: =?gb2312?Q?=B9=F0=D3=C0=C1=D6?= , LIU Hao , Tom Kacvinsky Cc: gcc-help , =?gb2312?Q?=C1=F8=C3=AF=EA=BF?= , =?gb2312?Q?=C0=EE=B4=B3=B4=B3?= , =?gb2312?Q?=CC=C0=C8=EA?= Date: Thu, 21 Oct 2021 20:04:56 +0800 In-Reply-To: <3515425a.16174.17ca0ec071d.Coremail.guiyonglin@huaqin.com> References: <20f6fd91.5593e.17c6d6050ed.Coremail.guiyonglin@huaqin.com> <0e6a4bba-872f-92e5-af61-e5cc94a2b547@126.com> <241991aa.65e41.17c9e31312b.Coremail.guiyonglin@huaqin.com> <3515425a.16174.17ca0ec071d.Coremail.guiyonglin@huaqin.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3030.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2021 12:05:08 -0000 On Thu, 2021-10-21 at 11:36 +0800, 桂永林 wrote: > If there is some special parameter we need check, when we link the c++ > lib to C program with C linker?  -lstdc++ is enough as you've already disabled exception and rtti. If exception or rtti is used, -lsupc++ is also needed. But missing them should cause a linker error instead of runtime issue.. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University