undefined reference _xstat

undefined reference _xstat

Post by Mark Buse » Wed, 01 Mar 2000 04:00:00

I believe glibc2 has changed _xstat to __xstat in the dynamic libs.  I
worked around this with my old Motif 2.0, by redefining _xstat to be
__xstat.  This can be done with -Xlinker flags to gcc.  Sorry don't have
the makefile with me at the moment.  This worked on my program Xinvest,
but not Xquote, had to statically link that to get it to work. [I've
added the more appropriate Linux group to the discussion.]

BTW, you are certainly using the Motif shared library as you have not
specified the -static flag to gcc.


> Hi,

> I am trying to compile a motif program but I get some undefined
> reference symbols
> _xstat. It has something to do with the shared library version of
> libXm.so but I am
> not using the shared library .

> The error is :

> gcc -o xmtutor widgets.o typeconverter.o runio.o sectionio.o init.o
> callbacks.o xmtutor.o -L/usr/X11R6/lib -lXm -lXt -lm -lXpm -lX11 -lXIE
> -lXext
> /usr/X11R6/lib/libXm.so: undefined reference to `_xstat'
> collect2: ld returned 1 exit status

> I am using redhat 6.1  and Linux mandrake 7.0.2. Does anyone know what's
> wrong.
> I linked the library in the right order, so that can not be the problem.

> regards

> Johan den Boer


1. Undefined reference to _xstat

I just set up my Linux system a few days ago using the InfoMagic
4-disk CD ROM set.  On most programs I try to compile using gcc
v.2.6.3 (including the kernel source), I get an "undefined reference
to _xstat" error toward the end of the compile.  Is there a library
function that is missing?
Don Burden
New Albany, Indiana, USA

2. b

3. 'undefined reference to _xstat' with new kernel

4. 2.4.20-ck2 and some game timings

5. undefined reference to `pw_crypt',undefined reference to `spw_unpack'

6. Anyone have luck with HP J2585B 10/100VG Card?

7. _xstat undefined problem when compiling on RH6.0

8. GNOME/fvwm2

9. PLEEASSE HELP: Undefined _ _fxstat & _ _xstat

10. Can't seem to fix `undefined reference to `stat'' and `undefined reference to `atexit''

11. undefined reference to 'assert'

12. undefined reference to atexit

13. 2.5.47-ac5:undefined reference to `boot_gdt_table'