Note that there are some explanatory texts on larger screens.

plurals
  1. POLuabind calling convention issues
    primarykey
    data
    text
    <p>I am having an issue with Luabind that I am unsure of how to fix without some over-simplified solution.</p> <p>Luabind appears to only allow binding to functions using the <code>__cdecl</code> calling convention. In my current project all of the functionality exposed to extensions/plugins is exposed using <code>__stdcall</code>. This leaves me unable to bind the exposed objects directly and instead I have to make wrappers for the objects exposed. This would be fine but there are a lot of objects that would need to be wrapped.</p> <p>For example, an object can look like this:</p> <pre class="lang-c prettyprint-override"><code>struct IObject { void __stdcall SomeFunc1( void ); void __stdcall SomeFunc2( const char* ); }; struct IObjectContainer { IObject* __stdcall GetObject( int ); IObject* __stdcall GetObject( const char* ); }; struct IObjectCore { IObjectContainer* __stdcall GetObjectContainer(); }; </code></pre> <p>I don't have the option of changing the entire projects calling convention currently so I am seeing if someone has a solution to perhaps patch Luabind to work with <code>__stdcall</code> functions. I am not the best with templates and with boost things, so I'm personally unsure where to even start trying to add the ability to use <code>__stdcall</code> functions.</p> <p>For reference, I am using:</p> <ul> <li>Lua 5.1.4</li> <li>Luabind 0.9.1</li> <li>VS2010</li> </ul> <p>Both Lua and Luabind are stock latest versions of their rev. (Not using Lua 5.2 for project restriction reasons, but if there is a <code>__stdcall</code> fix for 5.2/Luabind I will gladly take that as well.)</p> <p>I could only find a fix for a very old version of Luabind to do this but the patch floating on the net still for that does not line up with the current Luabind code at all.</p> <p>If there is any other information needed feel free to ask.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload