Subject: Re: ThreadedX patch, take 2
To: FUKAUMI Naoki <naoki@fukaumi.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-x11
Date: 01/20/2003 01:08:01
On Mon, Jan 20, 2003 at 05:16:51PM +0900, FUKAUMI Naoki wrote:

 > gcc -o ico -O2 -ansi -Dasm=__asm     -L../../exports/lib ico.o -lXext -lX11 -L/usr/X11R6/lib  -lm   -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
 > ico.o: In function `do_ico_window':
 > ico.o(.text+0x18d6): undefined reference to `pthread_mutex_lock'
 > ico.o(.text+0x18f5): undefined reference to `pthread_cond_broadcast'
 > ico.o(.text+0x1905): undefined reference to `pthread_mutex_unlock'
 > ico.o: In function `main':
 > ico.o(.text+0x2064): undefined reference to `pthread_cond_init'
 > ico.o(.text+0x209d): undefined reference to `pthread_create'
 > ico.o(.text+0x20b3): undefined reference to `pthread_mutex_lock'
 > ico.o(.text+0x20c5): undefined reference to `pthread_cond_wait'
 > ico.o(.text+0x20d5): undefined reference to `pthread_mutex_unlock'
 > *** Error code 1 (continuing)

Ah, I see what's happening here... It's using the Xthreads header file
as a way to actually get the thread API for the program.

This is Just Wrong.  As far as I am aware, Xthreads.h is intended only
(please correct me if I am wrong) for use in building thread-safe X
libraries.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>