Author Topic: Big changes planned (repost)  (Read 4175 times)

0 Members and 1 Guest are viewing this topic.

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Re: globalincs/pstypes.h:275: declaration does not declare anything ?
Quote
Originally posted by kieran
Ok, deleted my old sources, cvs'd a new copy,
cd'd to code; did the make after setting CXX=/opt/gcc-3.1/bin/g++ and I get this really cute error:

In file included from anim/animplay.h:108,
                 from anim/animplay.cpp:187:
globalincs/pstypes.h:275: declaration does not declare anything
globalincs/pstypes.h:275: parse error before `||' token

So what obvious thing am I missing?

compiling on RH7.3 with gcc-3.1
ugh, I though someone had fixed that...  there's a struct (ccodes) that has members 'or' and 'and' that apparently gives some compilers heartache.

Stupid names for variables anyhow... :mad:

Anyhow, I have changed the names to 'cc_or' and 'cc_and' and checked the changes in.  The only files affected were
    globalincs/pstypes.h
    render/3ddraw.cpp
    render/3dclipper.cpp

Do a "cvs update" and you should be good to go; please post any further issues.
your source code slave

 

Offline kieran

  • 22
/opt/gcc-3.1/bin/g++ -g -I/usr/local/include/SDL -I. -fno-exceptions -D_DEBUG -DNO_CD_CHECK -UNDEBUG -DNO_DIRECT3D -DNO_SOUND -DNO_JOYSTICK -DNO_NETWORK -DNO_STANDALONE -DUSE_OPENGL -c -o controlconfig/controlsconfig.o controlconfig/controlsconfig.cpp
In file included from controlconfig/controlsconfig.cpp:319:
ui/ui.h:385: friend declaration requires class-key, i.e. `friend struct
   UI_WINDOW'
ui/ui.h:386: friend declaration requires class-key, i.e. `friend struct
   UI_BUTTON'
ui/ui.h:387: friend declaration requires class-key, i.e. `friend struct
   UI_KEYTRAP'

....
Look familiar?
- My opinions are my own, my employer doesn't own this account.

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Quote
Originally posted by kieran
(some errors)

....
Look familiar?
No, it doesn't ;) gcc 3.1 must be picky.

*sigh* I changed the 'friend UI_XXX' declarations to 'friend class UI_XXX' in code/ui/ui.h and committed -- it should work now.  That's the ANSI C++ definition, but apparently both MSVC++ and gcc 2.95 are a little more lax.

You know the drill: cvs update ui/ui.h; make clean; make

AFAIK you're the first person to try gcc 3.1 on this code, so we're probably not done finding errors yet...
your source code slave

 

Offline kieran

  • 22
freespace2/freespace2.cpp
1428:           static int or=0, og=0, ob=0;
1456:                   or = r;

Also the MulDiv function freaks out
g++ 3.1 (compiler internal error).

So sounds like 3.1 is not a good idea,
oh well.
- My opinions are my own, my employer doesn't own this account.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Big changes planned (repost)
As long as the source works with the other compilers, running it with gcc 3.1 will likely be useful :nod:
-C