Gentoo Archives: gentoo-user

From: "Holger Hoffstätte" <holger@××××××××××××××××××.com>
To: gentoo-user@l.g.o, Helmut Jarausch <jarausch@××××××.be>
Subject: [gentoo-user] Re: error: template with C linkage
Date: Mon, 09 Jan 2023 15:19:33
Message-Id: f5a4094c-ac97-984c-6bd8-2a0ae4add7b2@applied-asynchrony.com
In Reply to: [gentoo-user] error: template with C linkage by Helmut Jarausch
1 On 2023-01-07 18:20, Helmut Jarausch wrote:
2 > Hi,
3 > for some of my (older) local ebuild I get the error
4 > template with C linkage
5 >
6 > What is the reason for this message?
7 > How can I change "C linkage" to "C++ linkage"
8
9 Your C++ code opens an 'extern "C" { ..' block (maybe via included header)
10 but apparently does not close it correctly. Defining a C++ template in a
11 C-linkage scope makes no sense, hence the complaint.
12 To fix you need to find the 'extern "C"' section and make sure it is closed.
13
14 cheers
15 Holger