Skip to main content
gamedev.net
🔒 Locked

luabind::building glutbind example problem

Started by Pet123 Feb 22, 2005 at 5:23 PM 0 replies 900+ views
Original Post
Pet123
Pet123
hi there im learning luabind now and luabind itself has been compiled successfuly, but the problem is when i try to compile the example 'glutbind' i got an error :

cannot convert parameter 1 from 'void (__stdcall *)(int,int)' to 'void (__cdecl *)(int,int)


i've checked its doc but still have no clue what to do to solve this problem, it looks that all opengl functions using __stdcall, can anyone here please tell me how to solve this problem? thank you very much. btw : i feel building luabind and its example is slow, can i make it any faster? by using pre-compiled headers or there are other methods? im using vc-71
Pet123
Pet123
okay, i have 'solved' this problem with a stupid method, just wrap those __stdcall opengl funcs with dummy __cdecl ones, like this :
void dummy_glutFullScreen() {    glutFullScreen(); }  ...  function(L, "glutFullScreen", &dummy_glutFullScreen);


this is really inconvinent, i believe there must be other smarter methods,
but what are they ...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.