Okay so now I added -lGL to the linker and I no longer get the error.
So far the only problem I notice is that I am getting a 2.1 context instead of a 3.x or 4.x…
Edit:
Hmm noticing that gl3wInit() returns -1…some sort of problem there.
Edit2:
gl3w only gave me the libgl3w.so file and gl3w.h, gl3w.c, and gl3.h…am I still missing some kind of opengl library file? I just added -lGL to the linker…but is that not the right library?>>
Edit3:
I noticed this is the output of my glGetString GL_VENDOR, GL_VERSION, etc. shows onboard graphics, not the discrete Nvidia card:
So I found I had to disable integrated graphics in the BIOS in order to get the proper GL Context with the discrete graphics hardware.
But, when I have added back in ‘gl3wInit()’ (it was not there before), the ‘glXGetProcAddress’ error returns.
I have linked the following
-lSDL2 -lGL -lGLU -lgl3w -lX11
but to no good… I tried to link to -lGLX, but it is not found as a library.
When I search repositories I can see I have 1 GLX runtime installed…
$ aptitude search GLX
i libgl1-mesa-glx - free implementation of the OpenGL API -- GLX runtime
p libgl1-mesa-glx-dbg - Debugging symbols for the Mesa GLX runtime
p libswt-glx-gtk-3-jni - Standard Widget Toolkit for GTK+ GLX JNI library
p libva-glx1 - Video Acceleration (VA) API for Linux -- GLX runtime
p libxcb-glx0 - X C Binding, glx extension
p libxcb-glx0-dbg - X C Binding, glx extension, debugging symbols
p libxcb-glx0-dev - X C Binding, glx extension, development files
p rss-glx - Really Slick Screensavers GLX Port
Must I install another?
How do I link to the GLX library so to fix the error that ‘glXGetProcAddress()’ is not found??
How can I change the gl3w to use ARB instead of regular??
When I do ‘scons’ in the gl3w directory, it generates the gl3w.c file at the same time as libgl3w.so. So if I change gl3w.c at this point, libgl3w.so is already built. I try to rebuild, but it re-builds the gl3w.c, un-doing my change.
Ok. So i found that the gl3w.c file is generated from the python script that came with gl3w repo, so I was able to edit that line in the script and change it to glXGetProcAddressARB, rebuild the library and copy it into the include and lib folders.
I also found the glx library in some sub-folders of my /usr/lib directory
However, even when I link to glx successfully, I still get the same undefined reference, to the ARB function and regular function: