- Created Thursday, April 2nd 2015 @ 16:22:31
I'm getting the following error when I try to compile my C bot:
/opt/aigames/scripts/compile.sh: 133: /opt/aigames/scripts/compile.sh: /opt/aigames/scripts/compile_c.sh: not found
I'm wondering if there's something extra I'm supposed to include or if it's just that the C compilation script doesn't exist for whatever reason?
Also, is it possible to do a Makefile-based compilation, out of curiosity?
- Created Thursday, April 2nd 2015 @ 17:03:50
wups, I seemed to have remove the C compilation script from our install script. So it wasn't your fault. It should be working again.
And you can't do a Makefile compilation, our compile script just uses a standard gcc compilation.
- Created Thursday, April 2nd 2015 @ 17:05:46
Fantastic, thanks. Is it possible to see the compilation script to get an idea of the compiler flags?
- Created Thursday, April 2nd 2015 @ 17:11:58
There are no compiler flags currently for C, but they could be added on request. (we have rarely had C bots so far so no request yet).
- Updated Thursday, April 2nd 2015 @ 17:17:40
In that case is it possible to request at least -std=c99 (or later)? Also, could you add -lrt as a linker flag and -O2 as a compiler flag? They'd be useful for in-code profiling and general performance, respectively.
- Created Thursday, April 2nd 2015 @ 17:18:14
I'll get back to you tomorrow :)
- Created Thursday, April 2nd 2015 @ 17:18:41
Thanks very much. :) In the meantime I can muddle by with treating it as C++.
- Created Friday, April 3rd 2015 @ 09:10:40
Alright I updated the compile script. Currently compiling with
gcc -std=c99 -o bin/run_ai -O2 -lm $SOURCE
- Created Friday, April 3rd 2015 @ 11:16:38
That's fantastic; thanks. I've got an interesting issue in that the linker can't find the symbol for sqrtf, despite -lm apparently being in the build script.