I'm trying to cross-compile a simple OpenGL application for the AM335x EVM and I'm not sure where the libraries are to link to.
My compile command is:
arm-linux-gnueabihf-g++ test.cpp -o am335x_part1 -lGL -lGLU -lglut
And the first part of my path is the link to the TI SDK directory:
PATH=/home/mike/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH
When I run this compile command I get:
test.cpp:1:21: fatal error: GL/glut.h: No such file or directory compilation terminated.
Which isn't totally surprising, it's probably trying to pull from the headers on my host system instead of anything in the SDK for the EVM. I'm wondering if someone can point me to the proper directories for OpenGL headers for the AM335x using the SDK. If not, are there any links to wiki's regarding how to build OpenGL for the EVM?
Thanks.
My program for reference:
#include <GL/glut.h> void display(void) { glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLES); { glColor3f(1,0,0); glVertex2f(0,0); glColor3f(0,1,0); glVertex2f(.5,0); glColor3f(0,0,1); glVertex2f(.5,.5); } glEnd(); glutSwapBuffers(); } void reshape(int w, int h) { } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); glutInitWindowPosition(200,200); glutInitWindowSize(512,512); glutCreateWindow("Part 1"); glutDisplayFunc(display); glutReshapeFunc(reshape); glutMainLoop(); return 0; }