Thanks chris. Sorry, my 'question' wasn't very clear.
In the Makefile:
Code: Select all
#PLATFORM=xorg
#PLATFORM=rpi
PLATFORM=rpi_noX
The part that matters from the error (right after libkazmath.a compiled and linked succesfully):
Code: Select all
gcc o/input.o o/obj.o o/support.o o/invaders.o lib/libkazmath.a -o invaders -lX11 -lGLESv2 -lEGL -lm -lbcm_host -L/opt/vc/lib `pkg-config libpng --libs`
o/input.o: In function `doEvents':
/home/pi/code/gles2framework/src/input.c:200: undefined reference to `__x_display'
/home/pi/code/gles2framework/src/input.c:200: undefined reference to `__eventWin'
Those variables are defined in src/input.c line 14 and 15, in an #ifndef:
Code: Select all
#ifndef __FOR_RPi_noX__
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
extern Display *__x_display;
extern Window __eventWin;
#endif //NOT __FOR_RPi_noX__
It compiles when commenting out the #ifndef and #endif line, so that they're declared. The code further down where they're used is also inbetween the same #ifndef's, so I don't understand why that works, or why it compiles flawlessly a second time after restoring the original input.c and 'make clean && make'.
I only get the error the first time, after cloning the git repo. Color me baffled.