You are not logged in.

#1 2004-09-21 18:53:22

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

can some really compile this?

http://www.sgi.com/products/software/op … rce/abgr.c

this is the first glut example

see last post

Can anyone tell what's wrong?

Offline

#2 2004-09-21 19:36:52

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: can some really compile this?

You forgot to link to several libraries, like libGL, libglut, libX11, etc.

Offline

#3 2004-09-21 19:51:25

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: can some really compile this?

hey Indan.

$ gcc abgr.c -L/usr/X11R6/lib -lGL -lX11 -lGLU -lglut
still says:

/usr/X11R6/lib/libglut.so: undefined reference to `XGetExtensionVersion'
/usr/X11R6/lib/libglut.so: undefined reference to `XFreeDeviceList'
/usr/X11R6/lib/libglut.so: undefined reference to `XQueryDeviceState'
/usr/X11R6/lib/libglut.so: undefined reference to `XListInputDevices'
/usr/X11R6/lib/libglut.so: undefined reference to `XFreeDeviceState'
/usr/X11R6/lib/libglut.so: undefined reference to `XOpenDevice'
/usr/X11R6/lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/X11R6/lib/libglut.so: undefined reference to `XSelectExtensionEvent'

Offline

#4 2004-09-21 21:09:10

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: can some really compile this?

libXext perhaps...

Offline

#5 2004-09-22 10:27:15

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: can some really compile this?

i3839 wrote:

libXext perhaps...

no but thanks I did
nm -Bog /usr/X11R6/lib/*.so | grep XGetExtensionVersion

and got:
/usr/X11R6/lib/libXi.so:000037f0 T XGetExtensionVersion
/usr/X11R6/lib/libglut.so:         U XGetExtensionVersion

adding -lXi sovled the issue

smile

Offline

#6 2005-03-08 15:44:09

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: can some really compile this?

Typo, you seem to have used -lxi instead of -lXi.

(This thread is more than a couple of days old, nice understatement. But that means you probably used the search function, hurray)

Offline

#7 2005-03-08 18:24:32

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: can some really compile this?

hemicuda wrote:

Oh, ok, I was trying -lxi as well as -lXi. Doesn't make any difference. Doing some googling I found out that on a regular distro I would have to reinstall the x-development-packages which obviously can't be the solution with Arch. So I'm still stuck. Any hints are greatly appreciated.

'cuda

the development packages are there... and ld.so.conf and ldconfig have nothing to do with compiling....

if you want libXi and it exists on your system, you need to add the proper path...

gcc -L/usr/X11R6/lib -lXi ${other_params}

Offline

Board footer

Powered by FluxBB