Subject: Re: compiler issues C/C++ linkage
To: Martin Husemann <>
From: Tom <>
List: netbsd-users
Date: 12/20/2005 19:04:00
Hi Martin,

thanks for your fast reply.

Am Dienstag, 20. Dezember 2005 15:40 schrieb Martin Husemann:
> On Tue, Dec 20, 2005 at 03:21:10PM +0100, Tom wrote:
> > Some google hits say, that the compiler does not surround the c-header
> > with
> >
> > extern "C" {
> >
> > }
> The NetBSD header files have __BEGIN_DECLS / __END_DECLS macros to do
> exactly this when used with a C++ compiler.

OK, that seams to work in mostly all cases.

> What you see sounds more like some C++ file is used within an extern "C"
> scope - i.e. exactly the opposite.
> 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 try to figure out, what is happening, but the project is a bit bigger, so I 
might need some time. It has definitly to do with the header files, as I 
could solve the error messages on some times by rearanging the headers (ok, 
just a first trial and error test). But I did not find out, why this happens. 
I thought that maybe somebody has had the same problems, but if not, I will 
have to try myself. (But I only have a remote login to that machine, and a vi 
so it's a bit more time consuming :-/)

I'm currently writing some lines of code, to reproduce the problem, but I'm  
not successful (everything compiles without the smallest problem ... )