[r246] Fails to compile in Linux

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Chris
Posts: 29
Joined: Fri Nov 28, 2008 1:18

[r246] Fails to compile in Linux

Post by Chris »

..due to font changes Randy recently did. Here's a patch that seems to fix it, as well as several warnings generated by header files.

Hmm.. this is kind of annoying not being able to attach a file with a .diff, .patch or .txt extension, so hopefully it comes through okay here:

Code: Select all

Index: src/sound/i_soundinternal.h
===================================================================
--- src/sound/i_soundinternal.h	(revision 246)
+++ src/sound/i_soundinternal.h	(working copy)
@@ -101,4 +101,4 @@
 
 
 
-#endif
\ No newline at end of file
+#endif
Index: src/sdl/sdlglvideo.cpp
===================================================================
--- src/sdl/sdlglvideo.cpp	(revision 246)
+++ src/sdl/sdlglvideo.cpp	(working copy)
@@ -254,10 +254,7 @@
 	// FIXME: Is it possible to do this without completely destroying the old
 	// interface?
 #ifndef NO_GL
-	FFont *font = NULL;
-	
 	FGLTexture::FlushAll();
-	// font = screen->Font;
 	I_ShutdownGraphics();
 
 	Video = new SDLGLVideo(0);
@@ -270,7 +267,6 @@
 #endif
 	
 	V_DoModeSetup(width, height, bits);
-	screen->SetFont(font);
 #endif
 	return true;	// We must return true because the old video context no longer exists.
 }
Index: src/basictypes.h
===================================================================
--- src/basictypes.h	(revision 246)
+++ src/basictypes.h	(working copy)
@@ -95,4 +95,4 @@
 #endif
 
 
-#endif
\ No newline at end of file
+#endif
Index: src/thingdef/thingdef_type.h
===================================================================
--- src/thingdef/thingdef_type.h	(revision 246)
+++ src/thingdef/thingdef_type.h	(working copy)
@@ -93,4 +93,4 @@
 
 };
 
-#endif
\ No newline at end of file
+#endif
Index: src/gl/gl_texture.h
===================================================================
--- src/gl/gl_texture.h	(revision 246)
+++ src/gl/gl_texture.h	(working copy)
@@ -168,7 +168,7 @@
 
 public:
 	FGLTexture(FTexture * tx);
-	~FGLTexture();
+	virtual ~FGLTexture();
 
 	unsigned char * CreateTexBuffer(ETexUse use, int cm, int translation, int & w, int & h, bool allowhires=true);
 	const WorldTextureInfo * Bind(int cm, int clamp=0, int translation=0);
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Re: [r246] Fails to compile in Linux

Post by wildweasel »

Chris wrote:.patch or .txt extension, so hopefully it comes through okay here:
Tried zipping it up first? I know it's not really necessary for size, but for convenience's sake it might be a little better.
Chris
Posts: 29
Joined: Fri Nov 28, 2008 1:18

Post by Chris »

The important change (to src/sdl/sdlglvideo.cpp) seems to be applied, though not the missing virtual for the destructor or the missing newlines on the headers. Attached a gzip'd patch for that, as well as the missing default build type for CMake (which otherwise causes it to build with no debug information).
Tried zipping it up first? I know it's not really necessary for size, but for convenience's sake it might be a little better.
I think it'd be more convenient to be posted as plain-text files (marked with the text/x-diff mimetype) than compressed files that have to be downloaded.
Attachments
gccpatches.diff.gz
(714 Bytes) Downloaded 56 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

FGLTexture is not supposed to be virtual. Why does GCC even complain about it? The only virtual function in there was obsolete and deleted.
Chris
Posts: 29
Joined: Fri Nov 28, 2008 1:18

Post by Chris »

Graf Zahl wrote:FGLTexture is not supposed to be virtual. Why does GCC even complain about it? The only virtual function in there was obsolete and deleted.
Ah, to be honest I didn't recheck that (SVN just kept the change after the update). Indeed, leaving it non-virtual doesn't produce warnings anymore. :)
Locked

Return to “Closed Bugs”