PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: jermy on September 02, 2020, 03:11:27 PM

Title: va_first() Unsupported statement
Post by: jermy on September 02, 2020, 03:11:27 PM
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
Title: Re: va_first() Unsupported statement
Post by: José Roca on September 02, 2020, 03:55:56 PM
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
Title: Re: va_first() Unsupported statement
Post by: Paul Squires on September 02, 2020, 04:00:43 PM
José beat me to it.  cva_arg