|
|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Alexey Kopylov 2:5030/661.23 26 Feb 2001 00:06:32 To : All Subject : помогите запустить нити --------------------------------------------------------------------------------
Hикак не могу откомпилировать файл, содержащий нити. Вот что пишет компилятор:
$ cc pt.c
/tmp/ccxwyEWi.o: In function `main':
/tmp/ccxwyEWi.o(.text+0x85): undefined reference to `pthread_create'
/tmp/ccxwyEWi.o(.text+0x9b): undefined reference to `pthread_create'
/tmp/ccxwyEWi.o(.text+0xae): undefined reference to `pthread_join'
/tmp/ccxwyEWi.o(.text+0xc1): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
$ gcc pt.c
/tmp/ccp94aPJ.o: In function `main':
/tmp/ccp94aPJ.o(.text+0x85): undefined reference to `pthread_create'
/tmp/ccp94aPJ.o(.text+0x9b): undefined reference to `pthread_create'
/tmp/ccp94aPJ.o(.text+0xae): undefined reference to `pthread_join'
/tmp/ccp94aPJ.o(.text+0xc1): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
Компилятор ведет себя так, как будто не подключен pthread.h, хотя в программе
прописано: #include <pthread.h>
В чем грабли?
P.S. Программа заведомо рабочая, но вот откомпилировать никак не удается.
C уважением, Alexey Kopylov.
--- УТВЕРЖДАЮ. MSG-редактор капитан 2.5 ранга Голд Дедович фор ДОС UNREG
* Origin: Гитлер капут! (2:5030/661.23)
Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/239663a99918c.html, оценка из 5, голосов 10
|