[linux-audio-dev] DSSI .so C++ problem

Peter Eschler peschler at t-online.de
Fri May 21 13:16:33 EDT 2004


i'm currently investigating making LDrum a DSSI instrument. Therefore i made a 
simple and nearly empty DSSI header to test it with the dssi_example_host.

I encountered some C++ problems but after putting the extern "C" stuff in 
place, dssi_example_host recognizes and starts my empty instrument :)

So i went on and started including some LDrum headers... and that broke the 
instrument :( 
dssi_example_host no longer recognizes nor starts it.
After hours of digging i'm finally stuck, because of another C++ problem. 
Here's what happens:

When I use my instrument code which is nearly empty and which does not include 
any LDrum headers (that is: headers which include C++ code) everything works 
By simply adding the following include:
#include <iostream>
the instrument is broken. It is no longer recognized. This only happens with 
iostream. Other headers like string or vector work fine (since these are all 
templates no library should be required, right?).

I used 'nm' to grep for unresolved symbols in my instrument .so and when 
including iostream there are some strange ones popping up (ios_base).

Instrument plugin with '#include <iostream>'
> nm ldrumdssi.so | grep U
 	 U __gxx_personality_v0
         U calloc
         U free
         U malloc

Instrument plugin without '#include <iostream>'
> nm ldrumdssi.so | grep U
         U _ZNSt8ios_base4InitC1Ev
         U _ZNSt8ios_base4InitD1Ev
         U __cxa_atexit
         U __dso_handle
         U __gxx_personality_v0
         U calloc
         U free
         U malloc

Can anybody tell me what I'm missing?

Peter Eschler

 "Without music, life would      _O_/ \_O_/ +----------------------+ 
  be a mistake - I would        / ))    []  | Peter Eschler        |
  only believe in a god who       \\    //  | peschler at t-online.de |
  knew how to dance." (Nietzsche) //    \\  +----------------------+

More information about the linux-audio-dev mailing list