Fatal Error: Glbasic do not tell variable naming conflict.

Previous topic - Next topic

spacefractal

I have started on a new game (placeholder named chicken), but I got a lots of fatal errors:

Code (glbasic) Select


_______________________________________
*** Configuration: IPHONE ***
precompiling:
GPC - GLBasic Precompiler V.10.070 SN:73686179 - 3D, NET
Wordcount:3298 commands
compiling:
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glGetClipPlane(DGInt, __GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:723: error: no matching function for call to 'DIMDATA(__GLBASIC__::DGIntArray&, int, __GLBASIC__::GLdouble [4])'
/cygdrive/D/Programmer/GLBasic_v11_beta2/Compiler/platform/Include/glb.h:923: note: candidates are: void __GLBASIC__::DIMDATA(__GLBASIC__::DGIntArray&, int, DGInt*)
/cygdrive/D/Programmer/GLBasic_v11_beta2/Compiler/platform/Include/glb.h:925: note:  void __GLBASIC__::DIMDATA(__GLBASIC__::DGNatArray&, int, DGNat*)
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glLoadMatrixd(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:1731: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glLoadMatrixd(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glMultMatrixd(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:1786: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glMultMatrixd(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glVertex2dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:2681: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glVertex2dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glVertex3dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:2761: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glVertex2dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glVertex4dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:2841: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glVertex2dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glNormal3dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:3081: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glNormal3dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glIndexdv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:3337: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glIndexdv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glColor3dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:3945: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glColor3dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glTexCoord1dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:4713: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glTexCoord1dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glTexCoord2dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:4793: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glTexCoord2dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glTexCoord3dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:4873: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glTexCoord3dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glTexCoord4dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:4953: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glTexCoord4dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glRasterPos2dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:5417: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glRasterPos2dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glRasterPos3dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:5497: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glRasterPos3dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glRasterPos4dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:5577: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glRasterPos4dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glRectdv(__GLBASIC__::DGIntArray&, __GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:5785: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glRectdv(const __GLBASIC__::GLdouble*, const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glTexGendv(DGInt, DGInt, __GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:6879: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '3' to 'void glTexGendv(__GLBASIC__::GLenum, __GLBASIC__::GLenum, const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glGetTexGendv(DGInt, DGInt, __GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:6945: error: cannot convert 'DGInt*' to '__GLBASIC__::GLdouble*' for argument '3' to 'void glGetTexGendv(__GLBASIC__::GLenum, __GLBASIC__::GLenum, __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glEvalCoord1dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:7359: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glEvalCoord1dv(const __GLBASIC__::GLdouble*)'
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp: In function 'DGInt __GLBASIC__::glEvalCoord2dv(__GLBASIC__::DGIntArray&)':
/cygdrive/C/Users/SPACEF~1/AppData/Local/Temp/glbasic/gpc_temp5.cpp:7471: error: cannot convert 'DGInt*' to 'const __GLBASIC__::GLdouble*' for argument '1' to 'void glEvalCoord2dv(const __GLBASIC__::GLdouble*)'
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 20.1 sec. Time: 13:15
Build: 0 succeeded.
*** 1 FAILED ***


I have no clue what Im should look for and this happens for iOS as well Android (but not on Win32). Im are pretty sure there is some sort of variable naming conflict which was happens with Greedy Mouse, but GlBasic does not detect those conflict very well.... That cause its pretty hard to fix that, due FATAL ERRORS is very annoying.

PS. This dosent happens with Greedy Mouse, so its a clearly a variable naming conflict, but no clue which one.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

What does your DIMDATA line look like ?  It should only be only be used for a unary list of data

spacefractal

I have not used DIMDATA by my self, but thanks for the direction.

its sdeen the issue was in gl.gbas, which I property have imported for some reason. I guess its was used for checking out the blending issue, when offbuffer was used in the past. Howover glbasic should still catch this kind of error, so I just put the file here:

https://dl.dropbox.com/u/3236515/GreedyMouse/gl.zip

PS. Its verry annoying when glbasic cannot detect errors in a array, and then just return a FATAL ERROR instead, which cause much harder to fix that.

PPS. This is NOT a bug as such, but more a missing feature really. So its should NOT been moved to the bug section.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/