[Mono-list] mono error: DllNotFoundException when calling from C code

coolmanu07 manojdwivedi07 at gmail.com
Thu Feb 10 01:12:20 EST 2011


Hello,

I have developed an application in mono .Net. I call a method of this
application from C code and that is working fine. Then i included a new
method in my .net class which is using System.Net dll of .Net.
now the C code is not able to call that method, however if i call that
method from another mono.Net code then it works. I have also set the debug
level for mono and the exception detail is as follows:

Mono-INFO: DllImport attempting to load: 'libc'.
Mono-INFO: DllImport loading location: 'libc.so'.
Mono-INFO: DllImport error loading library: '/usr/lib64/libc.so: invalid ELF
header'.
Mono-INFO: DllImport loading library: './libc.so'.
Mono-INFO: DllImport error loading library './libc.so: cannot open shared
object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libc'.
Mono-INFO: DllImport error loading library 'libc: cannot open shared object
file: No such file or directory'.

(process:22910): Mono-WARNING **: DllImport unable to load library 'libc:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport attempting to load: 'libc'.
Mono-INFO: DllImport loading location: 'libc.so'.
Mono-INFO: DllImport error loading library: '/usr/lib64/libc.so: invalid ELF
header'.
Mono-INFO: DllImport loading library: './libc.so'.
Mono-INFO: DllImport error loading library './libc.so: cannot open shared
object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libc'.
Mono-INFO: DllImport error loading library 'libc: cannot open shared object
file: No such file or directory'.

(process:22910): Mono-WARNING **: DllImport unable to load library 'libc:
cannot open shared object file: No such file or directory'.
System.DllNotFoundException: libc
  at (wrapper managed-to-native)
System.Net.NetworkInformation.NetworkInterface:uname (intptr)
  at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces
() [0x00000] in <filename unknown>:0
  at
ClearTrail.Services.RemoteManagement.CEnumerateNetworkAdapters.GetIPAddress
(Int32 iNetworkAdapterType) [0x00000] in <filename unknown>:0
  at ClearTrail.Services.RemoteManagement.CRemoteSDK.GetIPAddress
(.SDKConfig objSDKConfig) [0x00000] in <filename unknown>:0
  at
ClearTrail.Services.RemoteManagement.CRemoteSDK.GetBasicMessageProtocolObject
(System.String strServiceID, System.String strServiceType, System.String
strServiceVersion, System.String strDestinationPrimaryID, System.String
strDestinationSecondaryID, System.String strMessaneName) [0x00000] in
<filename unknown>:0


Any help is highly appreciated.
Thanks in advance.
Manoj
-- 
View this message in context: http://mono.1490590.n4.nabble.com/mono-error-DllNotFoundException-when-calling-from-C-code-tp3298626p3298626.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list