Subject: Re: compiler issues C/C++ linkage
To: None <>
From: Christos Zoulas <>
List: netbsd-users
Date: 12/20/2005 20:12:15
In article <>, Tom  <> wrote:
>Am Dienstag, 20. Dezember 2005 15:40 schrieb Martin Husemann:
>> If you could show us a small sample program that causes this problem, we
>> could check wether it's a problem in the application or a bug in the
>> installed headers.
>I have a glimps what's happening. However I didn't got a clue why (ok, maybe I 
>am on the wrong track on library creation)
>following scenario:
>#include "testinc.h"
>#include <string>
>#include <iostream>
>int main()
>  std::string hallo("String Test");
>  std::cout<<hallo<<std::endl;
>#ifndef testinc_h
>#define testinc_h
>#include <list>

It appears that g++ assumes that /usr/include only contains c sources.
If you change testinc.h to:

#ifndef testinc_h
#define testinc_h

extern "C++" {
#include <list>


it works.