Hello I successfully installed linux on Calibri T30 board and configured eclipse and successfully started “hello-world” according to the manual
Configure Eclipse - Getting Started with Toradex linux&desktop=linux
Right now I’m trying to run the Opengl ES sample code but when I try to build it I get errors.
The code I’m trying to run:
Help me run this basic code/:
ERRORS --------------------------------------------------------------------------------------------------------------
00:25:48 **** Incremental Build of configuration Debug for project testes ****
make all
Building file: ../src/testes.c
Invoking: Cross GCC Compiler
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi -O0 -g3 -Wall -O2 -pipe -g -feliminate-unused-debug-types -c -MMD -MP -MF"src/testes.d" -MT"src/testes.o" -o "src/testes.o" "../src/testes.c"
../src/testes.c: In function ‘LoadShader’:
../src/testes.c:48:44: error: ‘NULL’ undeclared (first use in this function); did you mean ‘KD_NULL’?
glShaderSource ( shader, 1, &shaderSrc, NULL );
^~~~
KD_NULL
../src/testes.c:48:44: note: each undeclared identifier is reported only once for each function it appears in
../src/testes.c: In function ‘Init’:
../src/testes.c:105:50: warning: pointer targets in passing argument 2 of ‘LoadShader’ differ in signedness [-Wpointer-sign]
vertexShader = LoadShader ( GL_VERTEX_SHADER, vShaderStr );
^~~~~~~~~~
../src/testes.c:36:8: note: expected ‘const char *’ but argument is of type ‘GLbyte * {aka signed char *}’
GLuint LoadShader ( GLenum type, const char *shaderSrc )
^~~~~~~~~~
../src/testes.c:106:54: warning: pointer targets in passing argument 2 of ‘LoadShader’ differ in signedness [-Wpointer-sign]
fragmentShader = LoadShader ( GL_FRAGMENT_SHADER, fShaderStr );
^~~~~~~~~~
../src/testes.c:36:8: note: expected ‘const char *’ but argument is of type ‘GLbyte * {aka signed char *}’
GLuint LoadShader ( GLenum type, const char *shaderSrc )
^~~~~~~~~~
../src/testes.c:136:56: error: ‘NULL’ undeclared (first use in this function); did you mean ‘KD_NULL’?
glGetProgramInfoLog ( programObject, infoLen, NULL, infoLog );
^~~~
KD_NULL
../src/testes.c:143:14: error: ‘FALSE’ undeclared (first use in this function); did you mean ‘KD_FALSE’?
return FALSE;
^~~~~
KD_FALSE
../src/testes.c:150:11: error: ‘TRUE’ undeclared (first use in this function); did you mean ‘GL_TRUE’?
return TRUE;
^~~~
GL_TRUE
../src/testes.c: In function ‘InitEGLContext’:
../src/testes.c:200:73: error: ‘NULL’ undeclared (first use in this function); did you mean ‘KD_NULL’?
surface = eglCreateWindowSurface(userData->eglDisplay, config, hWnd, NULL);
^~~~
KD_NULL
../src/testes.c: In function ‘kdMain’:
../src/testes.c:258:45: error: ‘NULL’ undeclared (first use in this function); did you mean ‘KD_NULL’?
if ( !eglGetConfigs(userData.eglDisplay, NULL, 0, &numConfigs) )
src/subdir.mk:18: recipe for target 'src/testes.o' failed
^~~~
KD_NULL
../src/testes.c: In function ‘Init’:
../src/testes.c:151:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [src/testes.o] Error 1
00:25:48 Build Finished (took 944ms)