[Mono-dev] EntryPointNotFoundException with __Internal method
Marcelo Zabani
mzabani at gmail.com
Tue Apr 30 01:31:54 UTC 2013
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 <robertj at gmx.net> 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) [0x00000]
>> in
>> <filename unknown>: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130429/f6f666b6/attachment-0001.html>
More information about the Mono-devel-list
mailing list