Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytebool.h error: two or more data types in declaration specifiers #691

Open
hemebond opened this issue Jun 2, 2023 · 1 comment
Open

Comments

@hemebond
Copy link

hemebond commented Jun 2, 2023

When compiling the current main branch I get this error with scons target="q3map2":

scons: done reading SConscript files.
scons: Building targets ...
gcc -o build/release/q3map2/tools/quake3/common/cmdlib.o -c -O2 -g -fno-strict-aliasing -pipe -Wall -fmessage-length=0 -fvisibility=hidden -I/usr/include/libxml2 -DQ_NO_STLPORT -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Ibuild/release/q3map2/include -Iinclude -Ibuild/release/q3map2/libs -Ilibs tools/quake3/common/cmdlib.c
gcc -o build/release/q3map2/tools/quake3/common/imagelib.o -c -O2 -g -fno-strict-aliasing -pipe -Wall -fmessage-length=0 -fvisibility=hidden -I/usr/include/libxml2 -DQ_NO_STLPORT -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Ibuild/release/q3map2/include -Iinclude -Ibuild/release/q3map2/libs -Ilibs tools/quake3/common/imagelib.c
In file included from /usr/include/unicode/umachine.h:52,
                 from /usr/include/unicode/utypes.h:38,
                 from /usr/include/unicode/ucnv_err.h:88,
                 from /usr/include/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:812,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from tools/quake3/common/inout.h:30,
                 from tools/quake3/common/imagelib.c:24:
libs/bytebool.h:37:18: error: two or more data types in declaration specifiers
   37 | typedef qboolean bool; // some code uses bool directly ..
      |                  ^~~~
In file included from libs/mathlib.h:29,
                 from tools/quake3/common/inout.h:31:
libs/bytebool.h:37:1: warning: useless type name in empty declaration
   37 | typedef qboolean bool; // some code uses bool directly ..
      | ^~~~~~~
tools/quake3/common/imagelib.c: In function ‘WriteTGAGray’:
tools/quake3/common/imagelib.c:1175:13: warning: unused variable ‘c’ [-Wunused-variable]
 1175 |         int c;
      |             ^
tools/quake3/common/imagelib.c:1174:13: warning: unused variable ‘i’ [-Wunused-variable]
 1174 |         int i;
      |             ^
scons: *** [build/release/q3map2/tools/quake3/common/imagelib.o] Error 1
scons: building terminated because of errors.

Compiling on Debian Linux x86_64.

@bnoordhuis
Copy link
Contributor

FWIW, I was able to work around that build error by commenting out the offending line:

diff --git a/libs/bytebool.h b/libs/bytebool.h
index 01c98747..03cc5250 100644
--- a/libs/bytebool.h
+++ b/libs/bytebool.h
@@ -34,7 +34,7 @@ typedef bool qboolean;
 #define qfalse false
 #else
 typedef enum { qfalse, qtrue } qboolean;
-typedef qboolean bool; // some code uses bool directly ..
+//typedef qboolean bool; // some code uses bool directly ..
 #endif
 
 typedef unsigned char byte;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants