IL2CPU icon indicating copy to clipboard operation
IL2CPU copied to clipboard

Yasm error: undefined symbol everywhere when trying to implement some C# code

Open valentinbreiz opened this issue 2 years ago • 1 comments

https://gist.github.com/valentinbreiz/8b099c7acd93783e90d71e644f070519

Builds fine until it goes to YASM part

Edit: After a deeper investigation this method seems to be the problem:

private static int Str_Dump( ILuaState lua )
{
	lua.L_CheckType( 1, LuaType.LUA_TFUNCTION );
	lua.SetTop( 1 );
	var bsb = new ByteStringBuilder();
	LuaWriter writeFunc = 
		delegate(byte[] bytes, int start, int length)
	{
		bsb.Append(bytes, start, length);
		return DumpStatus.OK;
	};
	if( lua.Dump( writeFunc ) != DumpStatus.OK )
		return lua.L_Error( "unable to dump given function" );
	lua.PushString( bsb.ToString() );
	return 1;
}

Specially LuaWriter writeFunc = delegate(byte[] bytes, int start, int length)

valentinbreiz avatar Dec 13 '23 10:12 valentinbreiz

@valentinbreiz as a work around have you tried a inline method

zarlo avatar Dec 13 '23 10:12 zarlo