bass.dll with c# mono

Started by m4him, 13 Jun '07 - 16:01

m4him

I have a working program a VS 2005 with bass.Net.dll
when I try to run it under mono I receive the below error:
Unhandled Exception: System.DllNotFoundException: bass.dll
  at (wrapper managed-to-native) Un4seen.Bass.Bass:BASS_Init (int,int,int,int,object)
  at Un4seen.Bass.Bass.BASS_Init (Int32 device, Int32 freq, BASSInit flags, Int32 win, System.Object clsid) [0x00000]

I have the bass.dll in the /debug /runtime /usr/lib/ and several other places but it is not found.
Has someone made the bass.Net.dll wrapper work under Linux c# mono?


radio42

I haven't tested it - since I only develop BASS.NET under Windows and not Unix.
I also haven't tested Mono yet and I am not sure, if it is really 100% .Net compliant?!

As an example:
The BASS_Init method is declared as follwed:
[DllImport("bass.dll", CharSet=CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool BASS_Init(int device, int freq, int flags, int win, [MarshalAs(UnmanagedType.AsAny)] object clsid);

I am really not a Unix guru - but isn't it, that under Linux you don't have .dll files - but rather .a lib?
So could a "bass.dll" be found and loaded under Linux, if it is a Windows dll?

ken

Quote from: m4him on 13 Jun '07 - 16:01I have a working program a VS 2005 with bass.Net.dll
when I try to run it under mono I receive the below error:
Unhandled Exception: System.DllNotFoundException: bass.dll
  at (wrapper managed-to-native) Un4seen.Bass.Bass:BASS_Init (int,int,int,int,object)
  at Un4seen.Bass.Bass.BASS_Init (Int32 device, Int32 freq, BASSInit flags, Int32 win, System.Object clsid) [0x00000]

I have the bass.dll in the /debug /runtime /usr/lib/ and several other places but it is not found.
Has someone made the bass.Net.dll wrapper work under Linux c# mono?




If you are coding C# Mono for Linux you must have a linux version of Bass (like: Bass.so, in "/usr/lib/") otherwise you can use DLL imort as you do in Windows like: [DllImport("bass.dll", CharSet=CharSet.Auto)]  Mono convert bass.dll to bass.so, but Miono cant use BASS.dll as it is Win32.

Ihave don this with another popular audio library that is compiled to Linux.

Me I love to see a Linux version of BASS!