* SALSA-Lib versus C++
@ 2007-07-01 23:33 J. Scott Merritt
2007-07-02 13:06 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: J. Scott Merritt @ 2007-07-01 23:33 UTC (permalink / raw)
To: alsa-devel
Dear List,
It -appears- to me that the source file headers generated by
SALSA-Lib-0.0.5 (for example SALSA:asoundlib.h) are not
generally usable from within a C++ program compiled with g++.
The first problem that I encountered was a failure in
IOC_TYPECHECK from asm-generic/ioctl.h. After much searching,
I concluded that this is a component of continuing struggles
related to "sanitized linux-kernel-headers". Some of the Debian
folks have supplied patches to disable this particular check when
the ioctl.h file is included from userland, but these patched
headers are not present in my cross-compile environment. This
behavior apparently is not a problem with gcc or g++ < 2.3.3 -
but shows up in later versions of g++. ... a real mess as best
I can tell ...
The next problem is that when warnings are enabled, g++
complains vigorously about void pointers that are implicitly
cast to typed pointers through-out all of the SALSA-Lib
supplied header files.
Perhaps SALSA-Lib was never intended from usable from C++
programs - and indeed it could argued that its intended
application (embedded systems) should avoid the use of C++.
If this is the case, perhaps a mention of this restriction
might be appropriate on the SALSA-Lib Website and/or in
its README file ?
Thanks again for all of your help in trying to get this working.
Best regards, Scott.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SALSA-Lib versus C++
2007-07-01 23:33 SALSA-Lib versus C++ J. Scott Merritt
@ 2007-07-02 13:06 ` Takashi Iwai
2007-07-02 13:31 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2007-07-02 13:06 UTC (permalink / raw)
To: J. Scott Merritt; +Cc: alsa-devel
At Sun, 1 Jul 2007 19:33:24 -0400,
J. Scott Merritt wrote:
>
> Dear List,
>
> It -appears- to me that the source file headers generated by
> SALSA-Lib-0.0.5 (for example SALSA:asoundlib.h) are not
> generally usable from within a C++ program compiled with g++.
>
> The first problem that I encountered was a failure in
> IOC_TYPECHECK from asm-generic/ioctl.h. After much searching,
> I concluded that this is a component of continuing struggles
> related to "sanitized linux-kernel-headers". Some of the Debian
> folks have supplied patches to disable this particular check when
> the ioctl.h file is included from userland, but these patched
> headers are not present in my cross-compile environment. This
> behavior apparently is not a problem with gcc or g++ < 2.3.3 -
> but shows up in later versions of g++. ... a real mess as best
> I can tell ...
>
> The next problem is that when warnings are enabled, g++
> complains vigorously about void pointers that are implicitly
> cast to typed pointers through-out all of the SALSA-Lib
> supplied header files.
>
> Perhaps SALSA-Lib was never intended from usable from C++
> programs - and indeed it could argued that its intended
> application (embedded systems) should avoid the use of C++.
> If this is the case, perhaps a mention of this restriction
> might be appropriate on the SALSA-Lib Website and/or in
> its README file ?
Did you try to include it from extern "C" { .. } block?
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: SALSA-Lib versus C++
2007-07-02 13:06 ` Takashi Iwai
@ 2007-07-02 13:31 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2007-07-02 13:31 UTC (permalink / raw)
To: J. Scott Merritt; +Cc: alsa-devel
At Mon, 02 Jul 2007 15:06:44 +0200,
I wrote:
>
> At Sun, 1 Jul 2007 19:33:24 -0400,
> J. Scott Merritt wrote:
> >
> > Dear List,
> >
> > It -appears- to me that the source file headers generated by
> > SALSA-Lib-0.0.5 (for example SALSA:asoundlib.h) are not
> > generally usable from within a C++ program compiled with g++.
> >
> > The first problem that I encountered was a failure in
> > IOC_TYPECHECK from asm-generic/ioctl.h. After much searching,
> > I concluded that this is a component of continuing struggles
> > related to "sanitized linux-kernel-headers". Some of the Debian
> > folks have supplied patches to disable this particular check when
> > the ioctl.h file is included from userland, but these patched
> > headers are not present in my cross-compile environment. This
> > behavior apparently is not a problem with gcc or g++ < 2.3.3 -
> > but shows up in later versions of g++. ... a real mess as best
> > I can tell ...
> >
> > The next problem is that when warnings are enabled, g++
> > complains vigorously about void pointers that are implicitly
> > cast to typed pointers through-out all of the SALSA-Lib
> > supplied header files.
> >
> > Perhaps SALSA-Lib was never intended from usable from C++
> > programs - and indeed it could argued that its intended
> > application (embedded systems) should avoid the use of C++.
> > If this is the case, perhaps a mention of this restriction
> > might be appropriate on the SALSA-Lib Website and/or in
> > its README file ?
>
> Did you try to include it from extern "C" { .. } block?
... looks like C++ really doesn't like the conversion.
So, don't use C++. I hate it :)
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-02 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-01 23:33 SALSA-Lib versus C++ J. Scott Merritt
2007-07-02 13:06 ` Takashi Iwai
2007-07-02 13:31 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.