Compilation error <command-line> ... expected identifier or '(' before numeric constant

Hi there !

I’m setting up my ioq3 dev environment for a new project, and I’m trying to do a first unmodified ioq3 compilation (I took the latest from github).

Here’s what it says, having trouble on compiling uix86.dll :

make[2]: `build/release-mingw32-x86/baseq3/qagamex86.dll' is up to date.
UI_CC code/q3_ui/ui_main.c

:0:4: error: expected identifier or ‘(’ before numeric constant

code/q3_ui/../qcommon/q_shared.h:190:15: note: in expansion of macro 'ui'
  unsigned int ui;
In file included from code/q3_ui/ui_local.h:26:0,
                 from code/q3_ui/ui_main.c:32:
code/q3_ui/../qcommon/q_shared.h:191:1: warning: no semicolon at end of struct or union [enabled by default]
 } floatint_t;
make[2]: *** [build/release-mingw32-x86/baseq3/ui/ui_main.o] Error 1
make[2]: Leaving directory `/e/_boulot/pro'14/game à niaque/proto'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/e/_boulot/pro'14/game à niaque/proto'
make: *** [release] Error 2

Has someone encounered this before ? thanks by advance :slight_smile:

I think this was established as a bug in that version of the MingW compiler.

See this post here:

I think this is the same issue that was brought up before:

Great ! That did it ! Here’s precisely what I’ve done :

in q_shared.h, line 188 or something, just add this before "Typedef union :

#ifdef ui
#undef ui

everything should compile smoothly !

Thanks a lot for that link :slight_smile: