• [gentoo-user] error: template with C linkage

    From Helmut Jarausch@21:1/5 to All on Mon Jan 9 12:40:01 2023
    Hi,
    for some of my (older) local ebuild I get the error
    template with C linkage

    What is the reason for this message?
    How can I change "C linkage" to "C++ linkage"

    Many thanks for a hint,
    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Holger_Hoffst=c3=a4tte?=@21:1/5 to Helmut Jarausch on Mon Jan 9 16:20:01 2023
    On 2023-01-07 18:20, Helmut Jarausch wrote:
    Hi,
    for some of my (older) local ebuild I get the error
    template with C linkage

    What is the reason for this message?
    How can I change "C linkage" to "C++ linkage"

    Your C++ code opens an 'extern "C" { ..' block (maybe via included header)
    but apparently does not close it correctly. Defining a C++ template in a C-linkage scope makes no sense, hence the complaint.
    To fix you need to find the 'extern "C"' section and make sure it is closed.

    cheers
    Holger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)