Xonotic Forums
Xonotic QCC source won't compile with GMQCC? - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Xonotic QCC source won't compile with GMQCC? (/showthread.php?tid=5146)



Xonotic QCC source won't compile with GMQCC? - kristus - 11-03-2014

I tried to compile the QCC progs.dat of Xonotic with GMQCC (which i read on Quake Wiki was the same compiler the developers of Xonotic was using) but the source won't compile for me. Is there anything more I need to do?

The issue I'm having is that GMQCC gets an issue with /common/util-pre.qh.
There are two errors.

1:
Expected 'pragma' keyword after '#', got 'ifdef'
2:
Junk after pragma.

Now I'll freely admit that I am not a programmer, and I probably never will be either. I can mostly only work with simple game logic mapscripts. So the issue here might be very simple. Never the less, I would greatly appreciate some help on the matter.


RE: Xonotic QCC source won't compile with GMQCC? - Mr. Bougo - 11-04-2014

What version of gmqcc and the xonotic source code are you using? What command exactly are you issuing to compile the progs?


RE: Xonotic QCC source won't compile with GMQCC? - tZork - 11-04-2014

looking at the makefile, you would need these flags:
-std=gmqcc -O3 -flno -Werror -fno-bail-on-werror -Wall -fftepp -fftepp-predefs -Wcpp -futf8 -Wno-field-redeclared -Wno-double-declaration


RE: Xonotic QCC source won't compile with GMQCC? - kristus - 11-04-2014

The version of the source is the same that comes with v0.7 of Xonotic and the GMQCC version is the same that is on the website at the present date.

Tried that command-line you presented tZork, considering how complicated it is, it's no wonder I couldn't do it myself. But even with that command line I get a shit-ton of Werrors and a few errors about initializing global constant vars as non constant expressions.
Don't think it compiled for me. Or I am missing something.


RE: Xonotic QCC source won't compile with GMQCC? - Mario - 11-04-2014

Latest GMQCC (or at least the development branch) doesn't work with 0.7 gamecode if I recall correctly, maybe try with the build that comes with 0.7.

You could do it all with this one liner:
cd /path/to/Xonotic/source/gmqcc && make && cd ../qcsrc && make QCC=../../gmqcc/gmqcc

If that still gives QC errors, something truly is broken.