• Welcome to PlanetSquires Forums.
 

va_first() Unsupported statement

Started by jermy, September 02, 2020, 02:41:27 PM

Previous topic - Next topic

jermy

Dear people,

This line wont compile ap = va_first()   when i want to use Win64, it's okay with Win32.
the compiler says:  error 286: Unsupported statement in -gen gcc mode



'------------------------------------------------------------------------
sub glPrint cdecl(byval x as integer, byval y as integer, byref fmt as string, ...)    '' Where The Printing Happens
dim text as string * 256                           '' Holds Our String
dim ap as any ptr                                  '' Pointer To List Of Arguments

'' If There's No Text
' if len(fmt)= 0 then                                '' Do Nothing
' exit sub
' end if

ap = va_first()                                   '' get pointer to first arg
' vsprintf (text, fmt, ap)                          '' And Converts Symbols To Actual Numbers


' glBindTexture (GL_TEXTURE_2D, textures(9).texID)  '' Select Our Font Texture
' glPushMatrix ()                                   '' Store The Modelview Matrix
' glLoadIdentity ()                             '' Reset The Modelview Matrix
' glTranslated (x, y, 0)                        '' Position The Text (0,0 - Bottom Left)
' glListBase (bbase - 32)                       '' Choose The Font Set
' glCallLists (strlen (text), GL_UNSIGNED_BYTE, strptr(text))   '' Draws The Display List Text
' glPopMatrix ()                                    '' Restore The Old Projection Matrix
end sub



Thanks in advance for your help

José Roca

As the error message says, it is not supported in 64-bit.

Try with the new cva_xxx built-in macros:
See: https://www.freebasic.net/wiki/KeyPgCvaList

Paul Squires

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer