Advertisement

luabind::building glutbind example problem

Started by February 22, 2005 05:23 PM
0 comments, last by Pet123 20 years ago
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
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 ...

This topic is closed to new replies.

Advertisement