1Mono(Mono 1.0)                                                  Mono(Mono 1.0)
2
3
4

NAME

6       mono-config - Mono runtime file format configuration
7

DESCRIPTION

9       The  Mono  runtime  will  load configuration data from the installation
10       prefix /etc/mono/config file,  the  ~/.mono/config  or  from  the  file
11       pointed by the MONO_CONFIG environment variable.
12
13       For   each   assembly   loaded   a   config   file   with   the   name:
14       /path/to/the/assembly.exe.config   is   loaded   as   well    as    the
15       ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.EXT.config file.
16
17       This file controls the behavior of the runtime.
18
19       The  file  contains an XML-like file with various sections, all of them
20       contained inside a section (It  actually  uses  GMarkup  to  parse  the
21       file).
22
23       This  page  describes the Unix-specific and Mono-specific extensions to
24       the   configuration   file;     For   complete   details,    see    the
25       http://www.mono-project.com/Config web page.
26

<dllmap> directive

28       You  use  the  dllmap  directive  to map shared libraries referenced by
29       P/Invoke in your assemblies to a different shared library.
30
31       This is typically used to map Windows libraries to Unix library  names.
32       The dllmap element takes two attributes:
33
34       dll    This  should be the same string used in the DllImport attribute,
35              optionally prefixed with "i:" to indicate that the  string  must
36              be matched in a case-insensitive way
37
38       target This should be the name of the library where the function can be
39              found: this name should be suitable for use  with  the  platform
40              native shared library loading routines (dlopen etc.), so you may
41              want to check the manpages for that, too.
42

<dllentry> directive

44       This directive can be used to map a specific  dll/function  pair  to  a
45       different  library and also a different function name. It should appear
46       inside a dllmap element with only the dll attribute specified.
47
48       The dllentry element takes 3 attributes:
49
50       dll    This is the target library, where the function can be found.
51
52       name   This is the name of the function as it appears in the  metadata:
53              it is the name of the P/Invoke method.
54
55       target This  is  the name of the function to lookup instead of the name
56              specified in the P/Invoke method.
57

Mapping based on operating system and cpu

59       Both the dllmap and the  dllentry  elements  allow  the  following  two
60       attributes  which  make  it easy to use a single configuration file and
61       support multiple operating systems  and  architectures  with  different
62       mapping requirements:
63
64       os     This  is  the name of the operating system for which the mapping
65              should be applied.  Allowed values  are:  linux,  osx,  solaris,
66              freebsd, openbsd, netbsd, windows, aix, hpux.
67
68       cpu    This  is  the  name  of  the  architecture for which the mapping
69              should be applied.  Allowed values are: x86, x86-64, sparc, ppc,
70              s390, s390x, arm, mips, alpha, hppa, ia64.
71
72       wordsize
73              This is the size of registers on the target architecture, it can
74              be either 32 or 64.
75
76       The attribute value for both attributes can be a  comma-separated  list
77       of  the  allowed values. Additionally, the first character may be a '!'
78       to reverse the meaning. An attribute value of "!windows,osx", for exam‐
79       ple,  would mean that the entry is considered on all operating systems,
80       except on Windows and OS X.  No spaces are allowed in any part  of  the
81       value.
82
83       Note  that  later  entries will override the entries defined earlier in
84       the file.
85

EXAMPLES

87       The following example  maps  references  to  the  `cygwin1.dll'  shared
88       library to the `libc.so.6' file.
89       <configuration>
90            <dllmap dll="i:cygwin1.dll" target="libc.so.6"/>
91       </configuration>
92       The  library  name  in  the DllImport attribute is allowed to be in any
93       case variant, like the following examples:
94            [DllImport ("cygwin1.dll")]
95            [DllImport ("Cygwin1.dll")]
96            [DllImport ("cygwiN1.Dll")]
97
98       This one maps the following C# method:
99            [DllImport ("libc")]
100            static extern void somefunction ();
101       to differentfunction in libdifferent.so , but to the same  function  in
102       the  library  libanother.so  when running under the Solaris and FreeBSD
103       operating systems.
104       <configuration>
105            <dllmap dll="libc">
106                 <dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
107                 <dllentry os="solaris,freebsd" dll="libanother.so" name="somefunction" target="differentfunction" />
108            </dllmap>
109       </configuration>
110
111

SEE ALSO

113       mono(1),monodis(1),mint(1)
114
115
116
117                                                                Mono(Mono 1.0)
Impressum