Could not find include file <stdio.h>

I’m trying to include stdio.h and stdlib.h in g_bot.c. But, I can’t seem to add header files to any of the .c files /code/game/.

When I go to compile it I get the following errors:

cpp: code/game/g_bot.c:6 Could not find include file < stdlib.h >
cpp: code/game/g_bot.c:7 Could not find include file < stdio.h >

I’ve tried editing the Makefile and under:

#############################################################################

SETUP AND BUILD – LINUX

#############################################################################

Adding: CLIENT_CFLAGS += -I/usr/include

But that hasn’t worked either. It works fine when I include the files in /code/server/ but some reason not when I include them in /code/game/

Thanks!

/code/qcommon/q_shared.h

“When writing mods, please add needed headers HERE, do not start including
stuff like < stdio.h > in the various .c files that make up each of the VMs
since you will be including system headers files can will have issues.”

I’ve tried adding them in here. But, still no luck.

I don’t think these libraries are typically supported for qvms. You probably need to restrict the build to dll/so only.

bg_lib.c/h contains what you need for qvms.