Re: [Mono-dev] EntryPointNotFoundException with __Internal method
hmm Thanks Robert! I was only adding --export-dynamic to generate the intermediary .o files. Now I've added it to create the *nginx* executable. Do you have any hints on the problem of Marshal.SizeOf returning 0 (zero)? This is the class whose size is said to be zero: *[StructLayout(LayoutKind.Sequential)]* * public class NginxChain {* * public NginxResponseBuffer buf;* * public NginxChain next;* * }* NginxResponseBuffer is another class with sequential layout, although its size is non-zero when calculated through Marshal.SizeOf. On Mon, Apr 29, 2013 at 9:59 PM, Robert Jordan wrote: > On 29.04.2013 21:20, Marcelo Zabani wrote: > >> When embedding Mono within Nginx, I received the following exception: >> >> *Unhandled Exception: System.**EntryPointNotFoundException: >> log_error_core_wrapper* >> * at (wrapper managed-to-native) Nam.NginxMethods:ngx_log_error >> (uint,intptr,int,string)* >> * at Nam.NginxMethods.LogInfo (IntPtr log, System.String msg) [0x0] >> in >> :0 * >> >> >> The DllImported method is this: >> >> *[DllImport ("__Internal", EntryPoint="log_error_core_**wrapper")]* >> *public static extern void ngx_log_error(uint level, IntPtr log, int err, >> string msg);* >> >> > You must link the main executable (nginx) with the the > > -Wl,--export-dynamic > > option, otherwise the dynamic linker won't expose its symbols to dlopen. > > Robert > > -- Marcelo Zabani (19) 9341-0221 ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EntryPointNotFoundException with __Internal method
On Apr 29, 2013, at 3:20 PM, Marcelo Zabani wrote: > When embedding Mono within Nginx, I received the following exception: > > Unhandled Exception: System.EntryPointNotFoundException: > log_error_core_wrapper > at (wrapper managed-to-native) Nam.NginxMethods:ngx_log_error > (uint,intptr,int,string) > at Nam.NginxMethods.LogInfo (IntPtr log, System.String msg) [0x0] in > :0 Which platform? IIRC __Internal doesn't work on Windows platforms. - Jon ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EntryPointNotFoundException with __Internal method
On 29.04.2013 21:20, Marcelo Zabani wrote: When embedding Mono within Nginx, I received the following exception: *Unhandled Exception: System.EntryPointNotFoundException: log_error_core_wrapper* * at (wrapper managed-to-native) Nam.NginxMethods:ngx_log_error (uint,intptr,int,string)* * at Nam.NginxMethods.LogInfo (IntPtr log, System.String msg) [0x0] in :0 * The DllImported method is this: *[DllImport ("__Internal", EntryPoint="log_error_core_wrapper")]* *public static extern void ngx_log_error(uint level, IntPtr log, int err, string msg);* You must link the main executable (nginx) with the the -Wl,--export-dynamic option, otherwise the dynamic linker won't expose its symbols to dlopen. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] EntryPointNotFoundException with __Internal method
I'm running Linux. On Mon, Apr 29, 2013 at 9:27 PM, Jonathan Pryor wrote: > On Apr 29, 2013, at 3:20 PM, Marcelo Zabani wrote: > > When embedding Mono within Nginx, I received the following exception: > > > > Unhandled Exception: System.EntryPointNotFoundException: > log_error_core_wrapper > > at (wrapper managed-to-native) Nam.NginxMethods:ngx_log_error > (uint,intptr,int,string) > > at Nam.NginxMethods.LogInfo (IntPtr log, System.String msg) [0x0] > in :0 > > Which platform? IIRC __Internal doesn't work on Windows platforms. > > - Jon > > -- Marcelo Zabani (19) 9341-0221 ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list