Hello, I am trying to use a library called MidiPort from C#. It is a C library so I've done this:
[DllImport("portmidi")]
internal static extern PmError Pm_Initialize();
to call
PmError Pm_Initialize( void );
When I try to run this program I get this error:
Unhandled Exception: System.DllNotFoundException: portmidi
at (wrapper managed-to-native) PortMidi.MidiStream:Pm_Initialize ()
at ScoreReadingTrainer.MainClass.Main (System.String[] args) [0x00000]
in /home/pupeno/selsampla/Score Reading Trainer - GtkSharp/Main.cs:10
and being more verbose:
Mono-INFO: DllImport attempting to load: 'portmidi'.
Mono-INFO: DllImport loading location: 'libportmidi.so'.
Mono-INFO: DllImport error loading library: '/usr/lib/libportmidi.so:
undefined symbol: Pt_Time'.
and there's the problem. Pt_Time is part of libporttime.so, not
libportmidi.so. libportmidi.so should be linked to libporttime.so, but it
isn't:
$ ldd /usr/lib/libportmidi.so
linux-gate.so.1 => (0xffffe000)
libasound.so.2 => /usr/lib/libasound.so.2 (0xb7e88000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d54000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d2d000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d29000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d16000)
/lib/ld-linux.so.2 (0x80000000)
This is likely to be a bug in the building files and/or the packaging, I've
already submitted a bug report about it. Meantime, is there any workaround I
can use from C#/.Net/Mono to still use this library?
Thank you.
--
J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com)
pgphRujDXfIEk.pgp
Description: PGP signature
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
