glX(Allocate/Free)MemoryNV

Hi… I’m trying to port a test I’ve made in win32 to linux that use those extensions… but I can’t compile it… the error: ‘undefined reference to ‘glXAllocateMemoryNV’’ & glXFreeMemoryNV. I’m linking with GL, SDL and GLU… and I’m using more extensions (some more from nvidia), so I really don’t know whats going on

I’ve a GeForce2MX and the latest drivers from nvidia… and they’re working fine.

Help please!

thanks.

  • royconejo.

Hi, it seems like you’ve ran into the same problem as I did. But never fear, help is here. The problem here is that the GL-headers installed into /usr/include/GL are not the ones provided by nvidia, which contain all the definitions for the extensions they’re providing (such as glXAllocate/FreeMemoryNV). Whatever distro you have, somewhere in the doc-tree there should be these files:

gl.h glx.h glxtokens.h

For me, on debian that directory is:

/usr/share/doc/NVIDIA_GLX-1.0/usr/include/GL

Now if you look at the content of this directory, you will see, that the glx.h header contains the definition you’re looking for. You can for instance put all GL-headers your project requires in your project tree in a directory called GL, add that directory to your compilers include search path (using -IGL) and include GL-headers like this #include “GL/gl.h”. This is probably the easiest way, because it’s not wise to just replace your systems GL-headers.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.