[yocto] dllmap config for a Mono app
jpewhacker at gmail.com
Thu Jun 8 07:08:47 PDT 2017
On Thu, 2017-06-08 at 16:41 +1000, Craig McQueen wrote:
> I have a Mono app that uses DllImport to load some functions from
> libraries. The app can't find the libraries unless I create a Mono
> config file containing dllmap lines to map the library's plain "DLL"
> name (e.g. "foo") to the real name of the .so file (e.g.
I'm not familiar with Mono, is libfoo a plain old library that anyone
can use, or it is some special "Mono Library"
> * What would be a good way in the .bb recipe to automatically create
> the required Mono config file? It would need to find the "real" names
> of the library files from the library(s) build output. So it would
> DEPENDS on the library(s).
> * Is it better to create a local config file, or write it into
> /etc/mono/config? (My Mono app has the DllImports in a compiled DLL,
> and so far I've found that I need to create a local MyDll.dll.config
> file; making a MyApp.exe.config file doesn't work.)
Packaging rules require that every file belong to one and only one
package. If your application writes /etc/mono/config, you wouldn't be
able to write that file from any other package, including some other
Mono application. The MyApp.exe.config file (unfortunately) sounds like
the ideal solution, because you know that no other package is going to
try and write that file. Writing MyDll.dll.config runs into the same
problem as /etc/mono/config (at least if you are trying to write it
from your MyApp recipe), as another app might want to write the same
file because it uses the same library but that isn't allowed by the
packaging rules. If you want to write MyDll.dll.config, it should be
done in the recipe that actually creates the dll.
> Craig McQueen
More information about the yocto