Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Dec 1999 15:01:20 -0500
From:      Viren Jain <viren@interactive.net>
To:        freebsd-hackers@freebsd.org
Subject:   Linking problems w/ pthreads on 3.3
Message-ID:  <4.2.0.58.19991206150019.00a63380@pop.interactive.net>

next in thread | raw e-mail | index | archive | help
NOTE: Please reply directly to my email address (viren@interactive.net)

Platform: x86, FreeBSD 3.3

While trying to link a threaded application with -pthread using the 
following command line:
gcc -I/usr/local/include -L/usr/local/lib/mysql -pthread -o impd daemon.o 
db.o handlers.o imp_list.o imp_util.o log.o main.o net.o opt.o request.o 
sig.o statsd.o util.o -lmysqlclient

I receive the following errors:

daemon.o(.text+0x10): undefined reference to `__pthread_fork'
db.o(.text+0x33c): undefined reference to `__pthread_sleep'
main.o(.text+0xce): undefined reference to `__pthread_detach'
net.o(.text+0x196): undefined reference to `__pthread_select'
net.o(.text+0x411): undefined reference to `__pthread_read'
net.o(.text+0x535): undefined reference to `__pthread_write'

Threaded libraries appear to be installed in /usr/lib (libc_r.a, libc_r.so, 
libc_r.so.3, and libc_r_p.a) and thus I am unsure of how to correct this 
problem. Any help or advice would be appreciated.

  -- Viren



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.2.0.58.19991206150019.00a63380>