On Fri, Jan 16, 2009 at 11:39 PM, Jacob Meuser <jake...@sdf.lonestar.org> wrote:
> On Fri, Jan 16, 2009 at 10:20:50PM -0800, patrick keshishian wrote:
>> Quick fix is to surround '#include <sndio.h>' with
>>
>> #ifdef __cplusplus
>> extern "C" {
>> #endif

This was silly of me. The #ifdef __cplusplus bits are superfluous, it
obviously is a C++ header file.

>> But shouldn't this be done in sndio.h header file itself with
>> __{BEGIN,END}_DECLS pairs?
>
> well, maybe.

I think it should.

> I'd like to know why it's needed on ppc and not i386 or amd64.

That seems odd that it compiled and linked alright on those.

> seems like the problem is in ppc, or at least there's an (unnecessary?)
> inconsistency between archs.

The compiler does the name mangling. I imagine both arch are using the
same version of gcc 3.3.5, granted the spec file would be different.

What is the output of nm on your SNDIOoutput.o when compiled without
the 'extern "C"' bit?

--patrick

Reply via email to