How to cross compile GLUS or GTK3 from custom crosscompiler?
Posted: Sun Jan 05, 2014 9:32 pm
Hi,
I have generated a hard floating cross compiler under crosstoolng (last version) then import openGL_Es in my custom cross compiler. Actually, I have a cross compiler that compile openGL.
I wish integrate GLUS or GTK3+ as on Raspbian in order to generate 2D window. I tried to compile GLUS source files (more simple as GTK, I think).
I cross compile GLUS source files with error when I include "glus_raspberrypi_es.c" (necessary for "glus_os_wrapper_es.c").
This file contains SDL library. Where can I find the source files of this library for Raspberry? or what is the most simply way to have GLUS in my custom cross compiler?
As anyone do this? and could help me step by step?
The next lines are an summary export of the compiler error
The makefile is:
If anyone as a simply way to integrate GTK3+ as on Raspbian in a custom cross-compiler, I would like to know how you made this?
I have generated a hard floating cross compiler under crosstoolng (last version) then import openGL_Es in my custom cross compiler. Actually, I have a cross compiler that compile openGL.
I wish integrate GLUS or GTK3+ as on Raspbian in order to generate 2D window. I tried to compile GLUS source files (more simple as GTK, I think).
I cross compile GLUS source files with error when I include "glus_raspberrypi_es.c" (necessary for "glus_os_wrapper_es.c").
This file contains SDL library. Where can I find the source files of this library for Raspberry? or what is the most simply way to have GLUS in my custom cross compiler?
As anyone do this? and could help me step by step?
The next lines are an summary export of the compiler error
Code: Select all
arm-rpi-linux-gnueabi-gcc -DGLUS_ES2 -I/opt/x-tools/arm-rpi-linux-gnueabi/include/OpenGL_ES -I/opt/x-tools/arm-rpi-linux-gnueabi/include/GLUS -I/opt/x-tools/arm-rpi-linux-gnueabi/include/OpenGL_ES/interface/vcos/pthreads -I/opt/x-tools/arm-rpi-linux-gnueabi/include/OpenGL_ES/interface/vmcs_host/linux -I/opt/x-tools/arm-rpi-linux-gnueabi/arm-rpi-linux-gnueabi/sysroot/include -g -c glus_raspberrypi_es.c -o glus_raspberrypi_es.o -Wno-deprecated-declarations
glus_raspberrypi_es.c:32:21: erreur fatale: SDL/SDL.h : No such file or directory
compilation terminée.
make: *** [glus_raspberrypi_es.o] Error 1
rm glus_line_es2.o glus_math.o glus_load.o glus_plane.o glus_perlin_es.o glus_intersect.o glus_log.o glus_planar.o glus_extension.o glus_point.o glus_random.o glus_egl_es.o glus_os_wrapper_es.o glus_matrix.o glus_quaternion.o
make: Leaving directory `/home/developpement/Documents/Raspberry/GLUS/GLUS'
Code: Select all
SDKSTAGE=/opt/x-tools/arm-rpi-linux-gnueabi
CFLAGS+=-DGLUS_ES2
#old flags
#INCLUDES+=-I$(SDKSTAGE)/include/OpenGL_ES -I$(SDKSTAGE)/include/GLUS -I$(SDKSTAGE)/include/OpenGL_ES/interface/vcos/pthreads -I$(SDKSTAGE)/include/OpenGL_ES/interface/vmcs_host/linux -I$(SDKSTAGE)/arm-rpi-linux-gnueabi/sysroot/include
#LDFLAGS+=-L$(SDKSTAGE)/lib/OpenGL_ES -L$(SDKSTAGE)/lib/GLUS -L$(SDKSTAGE)/arm-rpi-linux-gnueabi/sysroot/lib -lm -lc -ldl
INCLUDES+=-I$(SDKSTAGE)/include/OpenGL_ES -I$(SDKSTAGE)/include/GLUS -I$(SDKSTAGE)/include/OpenGL_ES/interface/vcos/pthreads -I$(SDKSTAGE)/include/OpenGL_ES/interface/vmcs_host/linux -I$(SDKSTAGE)/arm-rpi-linux-gnueabi/sysroot/include
LDFLAGS+=-L$(SDKSTAGE)/lib/OpenGL_ES -L$(SDKSTAGE)/lib/GLUS -L$(SDKSTAGE)/arm-rpi-linux-gnueabi/sysroot/lib -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lm -lc -ldl -lgflw -lglew
#-L$(SDKSTAGE)/arm-rpi-linux-gnueabi/sysroot/lib -lm -ldl
#-lX11 -lXi -lXmu -lglut -lGL -lGLU
all: $(BIN) $(LIB)
%.o: %.c
@rm -f $@
arm-rpi-linux-gnueabi-gcc $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations
%.o: %.cpp
@rm -f $@
arm-rpi-linux-gnueabi-g++ $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations
%.bin: $(OBJS)
arm-rpi-linux-gnueabi-gcc -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS)
#-Wl,--no-whole-archive -rdynamic
%.a: $(OBJS)
arm-rpi-linux-gnueabi-ar r $@ $^
clean:
for i in $(OBJS); do (if test -e "$$i"; then ( rm $$i ); fi ); done
@rm -f $(BIN) $(LIB)