0

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?

fakhir
  • 157
  • 10

1 Answers1

0

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.

Shoe
  • 74,840
  • 36
  • 166
  • 272
  • I think you misunderstood. I am not talking about compiling OpenGL on native OS (MacOS in my case). Rather I am using the Adobe's toolchain flascc (modified gcc/g++) that compiles C++ code to flash SWF. They have given several examples which I successfully compiled using their toolchain. But none of them show how to use/compile shaders using flascc! – fakhir Sep 22 '13 at 13:22
  • @fakhir, something is trying to use OpenGL functions in that compilation and it cannot find OpenGL 3.x functions. The above answer explains why. – Shoe Sep 22 '13 at 14:36