r343 won't compile on gcc

Bugs that have been resolved.

Moderator: Graf Zahl

baghead
Hosted
Posts: 37
Joined: Tue Dec 16, 2008 3:26

r343 won't compile on gcc

Post by baghead »

I thought I'd try to help benchmark, but:
[ 52%] Building CXX object src/CMakeFiles/zdoom.dir/p_mobj.o
/usr/src/gzdoom-svn/src/p_mobj.cpp: In function ‘bool P_HitWater(AActor*, sector_t*, fixed_t, fixed_t, fixed_t, bool)’:
/usr/src/gzdoom-svn/src/p_mobj.cpp:4567: error: jump to label ‘foundone’
/usr/src/gzdoom-svn/src/p_mobj.cpp:4550: error: from here
/usr/src/gzdoom-svn/src/p_mobj.cpp:4557: error: crosses initialization of ‘sector_t* hsec’
make[2]: *** [src/CMakeFiles/zdoom.dir/p_mobj.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2
Just a matter of gcc (g++ really) being strict...
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: r343 won't compile on gcc

Post by Graf Zahl »

fixed
User avatar
Agent ME
Posts: 229
Joined: Mon Jan 02, 2006 12:39

Re: r343 won't compile on gcc

Post by Agent ME »

Still broken:
[ 52%] Building CXX object src/CMakeFiles/zdoom.dir/p_mobj.o
/home/chris/Desktop/gzdoom_svn/src/trunk/src/p_mobj.cpp: In function ‘bool P_HitWater(AActor*, sector_t*, fixed_t, fixed_t, fixed_t, bool)’:
/home/chris/Desktop/gzdoom_svn/src/trunk/src/p_mobj.cpp:4574: error: jump to label ‘foundone’
/home/chris/Desktop/gzdoom_svn/src/trunk/src/p_mobj.cpp:4557: error: from here
/home/chris/Desktop/gzdoom_svn/src/trunk/src/p_mobj.cpp:4564: error: crosses initialization of ‘sector_t* hsec’
make[2]: *** [src/CMakeFiles/zdoom.dir/p_mobj.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2
Also http://forum.drdteam.org/viewtopic.php?f=24&t=4066 is just an older duplicate of this.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: r343 won't compile on gcc

Post by Graf Zahl »

I haven't even committed the change yet! Why do you have to be this impatient?
User avatar
Agent ME
Posts: 229
Joined: Mon Jan 02, 2006 12:39

Re: r343 won't compile on gcc

Post by Agent ME »

D'oh, I saw a newer revision (344) and figured it was the response to this topic.
baghead
Hosted
Posts: 37
Joined: Tue Dec 16, 2008 3:26

Re: r343 won't compile on gcc

Post by baghead »

Thanks, Graf =)

Do you have a newer version of CMakeLists.txt that hasn't been committed? I had to make a few changes to mine to get it to compile and link properly...

I added these lines:

Code: Select all

set( BZIP2_LIBRARIES bz2 )
add_subdirectory( game-music-emu )
And removed this:

Code: Select all

add_subdirectory( snes_spc )
I think bzip could be made to use system libraries as well, but this will get it to compile for now at least.
User avatar
StasBFG[iddqd]
Posts: 29
Joined: Thu Nov 16, 2006 4:12
Location: Moscow, Russia

Re: r343 won't compile on gcc

Post by StasBFG[iddqd] »

Where do you place the line about BZIP2_LIBRARIES?
I get a error:
/usr/bin/ld: cannot find -lbz2
baghead
Hosted
Posts: 37
Joined: Tue Dec 16, 2008 3:26

Re: r343 won't compile on gcc

Post by baghead »

Ah, whoops, I guess it's using system libraries after all...

Try installing the bzip dev package... on ubuntu apt-get install libbz2-dev

Oh, and you can place that line anywhere sensible (as in don't put it inside an "if msvc" block or something, just put it at the top level somewhere).

Return to “Closed Bugs”