1. Problem with define_c_proc
- Posted by Evan Marshall <1evan at sbcglobal.net> Oct 04, 2004
- 535 views
- Last edited Oct 05, 2004
As far I can tell, this should work. However I get an error. Can somebody figure where I went wrong? Using v2.4
include dll.e include machine.e atom gl gl = open_dll("OpenGL32.dll") atom szglMultiTexCoord1fARB, glMultiTexCoord1f, glMultiTexCoord1fARB, wglGetProcAddress wglGetProcAddress = define_c_func(gl, "wglGetProcAddress", {C_POINTER}, C_POINTER) szglMultiTexCoord1fARB = allocate_string("glMultiTexCoord1fARB") glMultiTexCoord1f = c_func(wglGetProcAddress,{szglMultiTexCoord1fARB}) glMultiTexCoord1fARB = define_c_proc("", glMultiTexCoord1f, {C_INT,C_FLOAT}) ------------------------ ex.err ------------------------ -- C:\Programming\Euphoria\Include\dll.e:48 in function define_c_proc() -- define_c_proc/func: an integer was expected, not a sequence -- lib = {} -- routine_name = 0 -- arg_sizes = {16777220,50331652} -- ... called from C:\Programming\EUPHORIA\Programs\OpenGL\Test.exw:17 -- Global & Local Variables -- C:\Programming\Euphoria\Include\machine.e: -- mem = 665248 -- check_calls = 1 -- C:\Programming\EUPHORIA\Programs\OpenGL\Test.exw: -- gl = 1590689792 -- szglMultiTexCoord1fARB = 695752 -- glMultiTexCoord1f = 0 -- glMultiTexCoord1fARB = <no value> -- wglGetProcAddress = 0
2. Re: Problem with define_c_proc
- Posted by "Juergen Luethje" <j.lue at gmx.de> Oct 04, 2004
- 484 views
- Last edited Oct 05, 2004
Evan Marshall wrote: > As far I can tell, this should work. However I get an error. > Can somebody figure where I went wrong? > Using v2.4 Recently someone reported a similar problem, using v2.4 *alpha*. Neither this nor v2.4 beta can use define_c_proc() to define a machine code routine. Your code work for me, using the Windows interpreter of v2.4 *Official Release*. Which 2.4 version are you using? <snip> > glMultiTexCoord1fARB = define_c_proc("", glMultiTexCoord1f, {C_INT,C_FLOAT}) > > > ------------------------ ex.err ------------------------ > -- C:\Programming\Euphoria\Include\dll.e:48 in function define_c_proc() > -- define_c_proc/func: an integer was expected, not a sequence <snip> Regards, Juergen -- /"\ ASCII ribbon campain | We don't know where to GOTO if we \ / against HTML in | don't know where we've COME FROM. X e-mail and news, | / \ and unneeded MIME | http://www.fortran.com/fortran/come_from.html
3. Re: Problem with define_c_proc
- Posted by Evan Marshall <1evan at sbcglobal.net> Oct 05, 2004
- 491 views
Juergen Luethje wrote: <snip> > > Recently someone reported a similar problem, using v2.4 *alpha*. Neither > this nor v2.4 beta can use define_c_proc() to define a machine code > routine. > <snip> > > Regards, > Juergen > > -- > /"\ ASCII ribbon campain | We don't know where to GOTO if we > \ / against HTML in | don't know where we've COME FROM. > X e-mail and news, | > / \ and unneeded MIME | <a > href="http://www.fortran.com/fortran/come_from.html">http://www.fortran.com/fortran/come_from.html</a> > Thanks Juergen. I've been using v2.4 beta and hadn't even realized it! Evan