Ron Johnson wrote:
On 10/06/08 10:48, Hugo Vanwoerkom wrote:Ron Johnson wrote:On 10/06/08 09:39, Hugo Vanwoerkom wrote:Hi,I am trying to compile *on my own* some sample code that comes with nvidia-settings and I get errors:do-nvctrl.cpp:(.text+0x1f): undefined reference to `XextFindDisplay(_XExtensionInfo*, _XDisplay*)'but I have Xext referenced:g++ -o do-nv-control-dvc do-nv-control-dvc.o do-nvctrl.o -L/usr/lib -L lib-nv -L /usr/X11R6/lib -lXNVCtrl -lqt-mt -lXext -lX11 -lm -lXxf86vm -lQtGui -lQtCore -lpthreadSo where does that entry reside? Anybody?Google is your friend! http://www.google.com/search?q=XextFindDisplayThe first result from this query shows that it's in libXext, package libxext-dev.Right. I saw that. And libxext-dev is installed and so is libxext6. Then why does g++ -o do-nv-control-dvc do-nv-control-dvc.o do-nvctrl.o -L/usr/lib -L lib-nv -L /usr/X11R6/lib -lXNVCtrl -lqt-mt -lXext -lX11 -lm -lXxf86vm -lQtGui -lQtCore -lpthreadstill give me an undefined reference to XextFindDisplay if I have both libraries installed?Hmmm. "$ dpkg -L libxext-dev" seems joyless, also, as is http://packages.debian.org/search.
I figured it out but don't know the solution:The errors refer to the parameters used for XextFindDisplay, not XextFindDisplay itself, because I am using g++.
When I do this:cc -Wall -I include-nv/ -I /usr/X11R6/include/ do-nv-control-dvc.c -o do-nv-control-dvc -L lib-nv/ -L /usr/X11R6/lib -lXNVCtrl -lXext -lX11
I get no errors. But when I change the 'cc' to 'g++' I get the errors. The reason I use g++ is because I want to use Qt classes. Hugo