I am working on a program and am using Tiny C Compiler with SDL and OpenGL. TCC doesn't include headers for opengl, so I tried copying them from both Visual C++ and MinGW. Both of them fail to compile with the following error:
v:/exe/tcc/include//GL/gl.h:1081: ',' expected
Line 1081 in both files is:
GLAPI void APIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
GLAPI void APIENTRY glVertex2dv( const GLdouble *v ); // <-- line 1081
GLAPI void APIENTRY glVertex2fv( const GLfloat *v );
Expansion for GLAPI:
/* GLAPI, part 1 (use WINGDIAPI, if defined) */
#if defined(__WIN32__) && defined(WINGDIAPI)
# define GLAPI WINGDIAPI
#endif
/* GLAPI, part 2 */
#if !defined(GLAPI)
# if defined(_MSC_VER) /* Microsoft Visual C++ */
# define GLAPI __declspec(dllimport)
# elif defined(__LCC__) && defined(__WIN32__) /* LCC-Win32 */
# define GLAPI __stdcall
# else /* Others (e.g. MinGW, Cygwin, non-win32) */
# define GLAPI extern
# endif
#endif
Expansion for APIENTRY:
/* APIENTRY */
#if !defined(APIENTRY)
# if defined(__WIN32__)
# define APIENTRY __stdcall
# else
# define APIENTRY
# endif
#endif
The only compiler flags I am setting are -b, -g, -Wall, and a few include directories.
Can I have some assistance with this? I will be happy to provide more information if needed.
I'm not really sure how I have fixed this. I think it had to do with some of the include directories I was passing. Anyway, problem is gone.