[Mono-devel-list] Should DB2CLient use db2cli.dll?
jonpryor at vt.edu
Sat Dec 20 11:29:03 EST 2003
Close, but not quite. Mono does what Java does with library mapping.
When the "foo" library is requested, "foo.dll" is loaded on Windows, but
"libfoo.so" is loaded on Unix systems. Note the leading "lib" and ".so"
So, if "db2cli" were the import library, it would look for
"libdb2cli.so" under Linux, not "db2cli.so", so the <dllmap/> entry
would still be required under Mono.
On Sat, 2003-12-20 at 11:10, Mark Easton wrote:
> I've been playing with P/Invoke recently and have become stumped by the
> DllImports in DB2ClientPrototypes.cs
> All the DllImport attributes seem to specify db2cli.dll as the native
> library, e.g
> [DllImport("db2cli.dll", EntryPoint = "SQLExecute")]
> internal static extern short SQLExecute(IntPtr handle);
> While I understand that this will work on Win and could be made to work
> on other OSes by using a <dllmap/> in the config file, it is my
> understanding that the DB2CLI library is called db2cli.so on Linux and
> that therefore if the .dll were dropped from all the declarations the
> code would automatically work on Linux without the need for dllmapping.
> So can anyone corroborate whether there's a shred of truth in my
> musings, or is it time for me to go back to the hospital?
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list