Incompatible libGL.so on Fedora 19 when building simple OpenGL application

I am trying to build a simple OpenGL application on “Fedora 19 x86_64” with latest NVIDIA drivers (340.24).

But I am getting this error when compiling

skipping incompatible /lib/libGL.so when searching for -lGL

I uninstalled the NVIDIA drivers by - NVIDIA-Linux-x86_64-340.24.run --uninstall

and reinstalled the drivers.
Now everything is working as it should :)

Thats weird, usually that happens when there is a mismatch between shared object build type, ie. 32 vs 64-bit.