Date: Sat, 6 Jan 2001 18:02:31 +0330 From: "Vahid Bohlul" <xypy@yahoo.com> To: <freebsd-questions@freebsd.org> Subject: error linking pthread program. Message-ID: <008501c077ed$908a2160$0600a8c0@camelia>
next in thread | raw e-mail | index | archive | help
hi all. has anybody encountered with this situation? I have written a program using posix threads. now that i compile it: gcc -I... -o ... x1.cpp x2.cpp -pthread it complains with these link errors: /tmp/ccnc1272.o: In function `main': /tmp/ccnc1272.o(.text+0x11d): undefined reference to `__pthread_fork' /tmp/ccRb1272.o: In function `dlUser::Authorize(void)': /tmp/ccRb1272.o(.text+0x1c16): undefined reference to `__pthread_sleep' /tmp/ccGy1272.o: In function `dlSocket::ReadLine(void)': /tmp/ccGy1272.o(.text+0xf9): undefined reference to `__pthread_read' /tmp/ccGy1272.o: In function `dlSocket::WriteLine(void)': /tmp/ccGy1272.o(.text+0x1b5): undefined reference to `__pthread_write' /tmp/ccDL1272.o: In function `dlListener::Accept(void)': /tmp/ccDL1272.o(.text+0x182): undefined reference to `__pthread_accept' when i comment out the line #include <pthread.h> error changes to this: implicit call to undeclared function pthread_create which is obvious. when I comment out those parts of program including pthread_code, the program compiles without any error. by the way, the operating system i use is freebsd 4.0 I'm sure i have forgotten something ridiculous. please help me. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008501c077ed$908a2160$0600a8c0>