Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App.config dllmap entry portability

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?

like image 493
BlueMonkMN Avatar asked Feb 26 '26 20:02

BlueMonkMN


1 Answers

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.

like image 133
skolima Avatar answered Mar 01 '26 08:03

skolima



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!