Re: Problems with undefined reference errors

"Mike A. Harris" <[email protected]>
Newsgroups gmane.linux.redhat.xfree86
Message-ID <[email protected]>
Here are my results without modification of your source:

[mharris@toboggan mharris]$ cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)
[mharris@toboggan mharris]$ rpm -q XFree86 XFree86-devel gcc
XFree86-4.3.0-2
XFree86-devel-4.3.0-2
gcc-3.2.2-5
[mharris@toboggan mharris]$ cat foo.c
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>

int main(void)
{
        Display* disp = XOpenDisplay(NULL);
        if (disp == NULL) return 1;
        XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock), True,CurrentTime);
        XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock), False,CurrentTime );
        XCloseDisplay(disp);
        return 0;
}
[mharris@toboggan mharris]$ gcc -Wall -I /usr/X11R6/include -L /usr/X11R6/lib -lX11 -lXtst -o foo foo.c
[mharris@toboggan mharris]$ file foo
foo: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
[mharris@toboggan mharris]$ ldd foo
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4002c000)
        libXtst.so.6 => /usr/X11R6/lib/libXtst.so.6 (0x4010b000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        libdl.so.2 => /lib/libdl.so.2 (0x40110000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40113000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


I suggest reinstalling Red Hat Linux 9 from scratch, and not 
replacing any core system components with homebrew builds, as 
that is a likely source of problem.

-- 
Mike A. Harris



_______________________________________________
xfree86-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/xfree86-list
IRC: #xfree86 on irc.redhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.