views:

140

answers:

1

The dllmap configuration file entry is used in Mono to map requests for windows DLLs to Linux (.so) libraries. But it seems that if Microsoft's .NET framework tries to parse a configuration file with such an entry, an error occurs because it doesn't understand "dllmap". I think everything else in my distribution can be distributed unchanged on both Linux and Windows XP. Of all the portability involved in this, is this configuration entry really the downfall -- the one non-portable piece? Isn't there a way to share this file across platforms too?

+1  A: 

Are you sure you need the "dllmap" entries? Can't you just rely on automatic mapping "somelibrary" to "somelibrary.dll" on Windows and "somelibrary.so" on Linux?

Besides, I though the framework just skip the entries it does not expect...

EDIT: The standard way to ship linux libraries is to have an version-less symlink pointing to the latest version. So you would add libfmodex.so pointing to libfmodex-4.22.01.so. Then use [DllImport("fmodex")] and the framework will figure the rest automatically.

skolima
1) The name of the Windows library is fmodex.dll. The name of the Linux library is libfmodex-4.22.01.so. I'd prefer not to rename them, and I doubt that the automatic mapping will figure that out.2) I thought .NET would skip the entries it doesn't understand too until I hit a runtime error -- apparently it never tried to read the config file until an error occurred, and then when it tried to read the config to see how to react, it had another error processing the file.
BlueMonkMN
I could check myself, but I'm not booted into Linux at the moment: is there such a thing as a symlink within a .tar.gz file so that when the archive is extracted you get the file and a symlink pointing to it?
BlueMonkMN
Yes, this is the dafault behaviour of tar.
skolima