[Plib-users] Re: Weird errors using ssg.h
Brought to you by:
sjbaker
From: Steven W. <st...@ba...> - 2001-09-20 20:47:18
|
Nevermind - I didn't use a *.cpp extension and the C++ headers in plib were being parsed by the gnu C compiler, not the C++ compiler. 8( My bad. 8) - Steve On Thu, 20 Sep 2001, Steven Webb wrote: > Date: Thu, 20 Sep 2001 14:08:32 -0600 (MDT) > From: Steven Webb <st...@ww...> > To: pli...@li... > Subject: Weird errors using ssg.h > > Hello. > > I'm just starting out using the plib stuff. > > I got these errors using both the 1.5.1 and the 1.4.2 plib headers and > libs: > > Code: > [snip] > #include <math.h> > #include <GL/gl.h> /* Include definitions of the OpenGL API */ > #include <GL/glut.h> /* Include definitions of the GLUT API */ > #include <plib/ssg.h> > > extern void redisplay ( void ) ; > > int main ( int argc, char **argv ) > { > glutInit ( &argc, argv ) ; > glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ; > glutInitWindowSize ( 640, 480 ) ; > glutCreateWindow ( "My First OpenGL Program" ) ; > glutDisplayFunc ( redisplay ) ; > ssgInit(); > glutMainLoop () ; > return 0 ; > } > > void redisplay ( void ) > { > } > [snip] > > Output: > In file included from /home/swebb/plib/include/plib/ssg.h:28, > from test.c:10: > /home/swebb/plib/include/plib/ul.h:117: parse error before `ulClock' > /home/swebb/plib/include/plib/ul.h:118: syntax error before `{' > /home/swebb/plib/include/plib/ul.h: In function `getRawTime': > /home/swebb/plib/include/plib/ul.h:131: warning: empty declaration > /home/swebb/plib/include/plib/ul.h:133: parse error before `public' > /home/swebb/plib/include/plib/ul.h:142: `start' undeclared (first use in this function) > /home/swebb/plib/include/plib/ul.h:142: (Each undeclared identifier is reported only once > /home/swebb/plib/include/plib/ul.h:142: for each function it appears in.) > /home/swebb/plib/include/plib/ul.h: In function `getMaxDelta': > /home/swebb/plib/include/plib/ul.h:150: parse error before `{' > /home/swebb/plib/include/plib/ul.h: In function `getDeltaTime': > /home/swebb/plib/include/plib/ul.h:153: parse error before `{' > > [tons more omitted - compiler output attached as compile.out, source as > ssg_example.c] > > My system is a debian linux (woody) machine with most *-dev libs > installed. The 1.5.1 versino of plib was straight from the debian > packages, but the 1.4.2 version was compiled by me and installed > elsewhere. Both versions had similar errors. > > Is there some flag or something that I'm missing on my compile line? I'm > using: > > gcc test.c -lGL -lGLU -lXmu -lm -lglut -lplibssg -L/usr/X11R6/lib > -L/home/swebb/plib/lib -I/home/swebb/plib/include > > - Steve > > -- > EMAIL: (h) st...@ba... WEB: http://badcheese.com/~steve > (w) sw...@ra... > ste...@ma... > > -- EMAIL: (h) st...@ba... WEB: http://badcheese.com/~steve (w) sw...@ra... ste...@ma... |