[Mono-list] libc.so vs libc.so.6

Jonathan Pryor jonpryor at vt.edu
Mon Jan 14 17:30:33 UTC 2013


On Jan 14, 2013, at 12:11 PM, tomason <tom at creamysoft.com> wrote:
> Is there a way to tell mono to look somewhere else for libc.so?

Yes: an .exe.config with a <dllmap/>:

	http://mono-project.com/DllMap

However, this really shouldn't be necessary; mono includes a default dllmap in $prefix/etc/mono/config which _should_ contain an appropriate remapping, e.g. on OS X:

	  <dllmap dll="libc" target="libc.dylib" os="!windows"/>                        

However, for that to work you need to use the same value in your [DllImport], e.g. from mono/mcs/class/corlib/Linux/Linux.cs:

	[DllImport("libc", EntryPoint="getpid")]
	private unsafe static extern int _getPid(); 

What library are you using in your [DllImport]'s? Could you try using "libc" and see if that fixes things?

 - Jon



More information about the Mono-list mailing list