|
|
|
|
|
 Re: 还有一个线程问题 - teawater [ 2005-12-04 14:31 | 24 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
#include <stdio.h>
#include <pthread.h>
void *test1(void *ptr)
{
int i;
for( i = 0; i < 10; i++)
printf("test1 complete
");
}
int main()
{
pthread_t thread1;
pthread_create(&thread1, NULL, test1,0);
return 0;
}
# gcc -o aa aa.c
/tmp/ccax3NyM.o(.text+0x5b):in function 'main': undefined reference to 'pthread_create'.
请问各位这是为什么呢?我已经在头文件包含pthread.h了啊?请指教 谢谢
|
|
|
[Original]
[Print]
[Top]
|
|
« Previous thread
使用conio.h的问题 |
C/C++编程版
第21页 |
Next thread »
怪的c问题 请您欣赏 |
|