C error: Expected expression

Joshua Root jmr at macports.org
Tue Nov 13 14:11:01 UTC 2018


On 2018-11-14 00:48 , Mark Brethen wrote:
> Having patched calculix-cgx with the OpenGL framework, I’m now getting the following error when compiling glut:
> 
> :info:build /opt/local/bin/gcc-mp-5 -O2 -Wall -Wno-narrowing -I./ -I/usr/include -I../../libSNL/src -I../../glut-3.5/src -I/usr/X11/include    -c -o ../../glut-3.5/src/glut_ext.o ../../glut-3.5/src/glut_ext.c
> :info:build ../../glut-3.5/src/glut_ext.c:16:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'glutExtensionSupported'
> :info:build  glutExtensionSupported(const char *extension)
> :info:build  ^
> :info:build make: *** [../../glut-3.5/src/glut_ext.o] Error 1
> 
> what does this mean?
> 
> here’s line 14-17 in glut_ext.c:
> 
> /* CENTRY */
> int APIENTRY 
> glutExtensionSupported(const char *extension)
> {

The compiler sees something that looks like invalid syntax. Is APIENTRY
perhaps not defined as a macro?

- Josh


More information about the macports-dev mailing list