[haXe] DEFINE_ENTRY_POINT

Daniel Cassidy mail at danielcassidy.me.uk
Tue Feb 27 15:26:35 CET 2007


Hi Lee,

On 2/27/07, Lee McColl Sylvester <lee at designrealm.co.uk> wrote:
> I've looked more into this, and it appears that, if the function I'm
> passing varies in declaration by even the slightest.  ie
>
> extern void main( void );
>
> instead of
>
> extern "C" void main( void );
>
> then it complains.  Therefore, what does the DEFINE_ENTRY_POINT
> link the entry function as?  If the library I'm wrapping forces extern of a
> different signature, can I easily force this in the neko definition?

Surely you can just write a wrapper function with the correct linkage? e.g.:

extern "C" void fake_entry () {
	real_entry();
}

DEFINE_ENTRY_POINT(fake_entry)


Dan



More information about the Haxe mailing list