Man page updates
[mono.git] / man / mono-config.5
1 .\" 
2 .\" mono-config configuration page.
3 .\" (C) Ximian, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"   Paolo Molaro (lupus@ximian.com)
7 .\"
8 .TH Mono "Mono 1.0"
9 .SH NAME
10 mono-config \- Mono runtime file format configuration
11 .SH DESCRIPTION
12 The Mono runtime will load configuration data from the
13 installation prefix /etc/mono/config file, the ~/.mono/config or from
14 the file pointed by the MONO_CONFIG environment variable.
15 .PP
16 For each assembly loaded a config file with the name:
17 /path/to/the/assembly.exe.config is loaded as well as the
18 ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.EXT.config file. 
19 .PP
20 This file controls the behavior of the runtime.
21 .PP
22 The file contains an XML-like file with various sections, all of them
23 contained inside a 
24 .B<configuration> 
25 section (It actually uses GMarkup
26 to parse the file).
27 .PP
28 This page describes the Unix-specific and Mono-specific extensions to
29 the configuration file;   For complete details, see the
30 http://www.mono-project.com/Config web page.
31 .SH <dllmap> directive
32 You use the dllmap directive to map shared libraries referenced by
33 P/Invoke in your assemblies to a different shared library.
34 .PP
35 This is typically used to map Windows libraries to Unix library names.
36 The 
37 .B dllmap
38 element takes two attributes:
39 .TP
40 .I dll
41 This should be the same string used in the DllImport attribute
42 .TP
43 .I target
44 This should be the name of the library where the function can be found: 
45 this name should be suitable for use with the platform native shared library 
46 loading routines (dlopen etc.), so you may want to check the manpages for that, too.
47 .SH <dllentry> directive
48 This directive can be used to map a specific dll/function pair to a different
49 library and also a different function name. It should appear inside a
50 .B dllmap
51 element with only the dll attribute specified.
52 .PP
53 The
54 .B dllentry
55 element takes 3 attributes:
56 .TP
57 .I dll
58 This is the target library, where the function can be found.
59 .TP
60 .I name
61 This is the name of the fuction as it appears in the metadata: it is the name 
62 of the P/Invoke method.
63 .TP
64 .I target
65 This is the name of the function to lookup instead of the name specified in the 
66 P/Invoke method.
67 .SH EXAMPLES
68 The following example maps references to the `cygwin1.dll' shared
69 library to the `libc.so.6' file.  
70 .nf
71 <configuration>
72         <dllmap dll="cygwin1.dll" target="libc.so.6"/>
73 </configuration>
74 .fi
75 .PP
76 This one maps the following C# method:
77 .nf
78         [DllImport ("libc")]
79         static extern void somefunction ();
80 .fi
81 to
82 .B differentfunction
83 in
84 .B libdifferent.so.
85 .nf
86 <configuration>
87         <dllmap dll="libc">
88                 <dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
89         </dllmap>
90 </configuration>
91 .fi
92
93 .SH SEE ALSO
94 .BR mono(1), monodis(1), mint(1)