Connecting Tech Pros Worldwide Forums | Help | Site Map

error: syntax error before '*' token

Manuel
Guest
 
Posts: n/a
#1: Jan 11 '06
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
devc++.
So I've imported the glut32.dsp into devc++, included manually some
headers, and start to compile.

It return a very strange error. In your experience, where I should
looking to find the real error? Surely the sintax of glut is correct...

gcc.exe -c glut_bitmap.c -o glut_bitmap.o -I"C:/Dev-Cpp/include"
-I"../../include" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS
-D_USRDLL -DGLUT32_EXPORTS -UGLUT_USE_SGI_OPENGL

In file included from glut_bitmap.c:8:
lutint.h:280: error: syntax error before '*' token
glutint.h:281: error: syntax error before '*' token
glutint.h:282: error: syntax error before '*' token
glutint.h:283: error: syntax error before '*' token
glutint.h:284: error: syntax error before '*' token
glutint.h:285: error: syntax error before '*' token
glutint.h:286: error: syntax error before '*' token
glutint.h:287: error: syntax error before '*' token
glutint.h:288: error: syntax error before '*' token
glutint.h:289: error: syntax error before '*' token
glutint.h:290: error: syntax error before '*' token
glutint.h:291: error: syntax error before '*' token
glutint.h:292: error: syntax error before '*' token
glutint.h:293: error: syntax error before '*' token
glutint.h:294: error: syntax error before '*' token
glutint.h:295: error: syntax error before '*' token
glutint.h:296: error: syntax error before '*' token
glutint.h:297: error: syntax error before '*' token
glutint.h:298: error: syntax error before '*' token
glutint.h:299: error: syntax error before '*' token
glutint.h:300: error: syntax error before '*' token
glutint.h:301: error: syntax error before '*' token
glutint.h:302: error: syntax error before '*' token
glutint.h:384: error: syntax error before "GLUTdisplayCB"
glutint.h:384: warning: no semicolon at end of struct or union
glutint.h:385: warning: data definition has no type or storage class
glutint.h:386: error: syntax error before "mouse"
glutint.h:386: warning: data definition has no type or storage class
glutint.h:387: error: syntax error before "motion"

etc etc...

Using google, I've found a similar case, but it's not english and I
don't understand:

http://exp.dk/spm/625931

Help!
mlimber
Guest
 
Posts: n/a
#2: Jan 11 '06

re: error: syntax error before '*' token


Manuel wrote:[color=blue]
> I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
> devc++.
> So I've imported the glut32.dsp into devc++, included manually some
> headers, and start to compile.[/color]

Try posting to a glut user list or something. They are likely to have
seen this before or at least will be more equipped to figure out the
problem. In any case, without a concrete language question, this post
is off-topic here. See this FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
[color=blue]
> It return a very strange error. In your experience, where I should
> looking to find the real error?[/color]

Look in the header files indicated by the error messages. Are all the
types therein defined? If you can't figure it out, try to reduce the
code to a minimal sample that you could post here and that we could try
compile.
[color=blue]
> Surely the sintax of glut is correct...[/color]
[snip]

A gratuitous assumption. There are many compilers and configurations
out there. They have no doubt tested it on many of them, but they
simply can't test all of them.

Cheers! --M

JustBoo
Guest
 
Posts: n/a
#3: Jan 11 '06

re: error: syntax error before '*' token


On Wed, 11 Jan 2006 14:54:54 +0100, Manuel
<manuelbastioniREMOVETHIS@tin.it> wrote:
[color=blue]
>I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
>devc++.
>So I've imported the glut32.dsp into devc++, included manually some
>headers, and start to compile.
>Help![/color]

There are also helpful people in the newsgroups
below that work with glut:

comp.graphics.algorithms
comp.graphics.api.opengl

Good Luck
Ben Pope
Guest
 
Posts: n/a
#4: Jan 12 '06

re: error: syntax error before '*' token


Manuel wrote:[color=blue]
> I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
> devc++.
> So I've imported the glut32.dsp into devc++, included manually some
> headers, and start to compile.
>
> It return a very strange error. In your experience, where I should
> looking to find the real error? Surely the sintax of glut is correct...
>
> gcc.exe -c glut_bitmap.c -o glut_bitmap.o -I"C:/Dev-Cpp/include"
> -I"../../include" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS
> -D_USRDLL -DGLUT32_EXPORTS -UGLUT_USE_SGI_OPENGL
>
> In file included from glut_bitmap.c:8:
> lutint.h:280: error: syntax error before '*' token[/color]

I would look before the '*' in question.

What type is directly before the "*"? Where is that type defined? Is
the file in which the type is defined, included by glut_bitmap.c, before
lutint.h is included?

This is off topic, since you haven't posted the code.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Closed Thread