Simple OpenGL shader demo using Flascc?

281 views Asked by At

It's been 2 weeks and I am still standing at zero point.

I tried to compile a sample code using following commands:

/flascc/bin/g++ -O4                                        \
    -I/GLS3D-master/install/usr/include/                   \
    -L/GLS3D-master/install/usr/lib/ ../lesson2.cpp        \
    /GLS3D-master/install/usr/lib/libGL.abc -symbol-abc=Console.abc  \
    -swf-size=500x500 -emit-swf -o lesson2.swf -lglut -lGL 

and it gave following errors:

/var/..../ccaleAEC.o: error: undefined reference to '_glCreateShader'
/var/..../ccaleAEC.o: error: undefined reference to '_glGetUniformLocation'
collect2: ld returned 1 exit status

Can someone please post a really simple OpenGL code using simple shaders that actually compiles with flascc?

1

There are 1 answers

2
Shoe On

You either didn't link OpenGL correctly or don't have the correct version of OpenGL installed. I'd go for the second since the functions it is complaining about are functions that are not present in OpenGL 2.x and were introduced in OpenGL 3.x.

If you are on Max OSX, 99% it is the second, since only Mavericks (the latest OS) have OpenGL 3.x+ installed.