linux thread

    技术2022-05-19  19

    结果报错:pthread.c:(.text+0x85):对‘pthread_create’未定义的引用由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-lpthread参数:gcc -o pthread -lpthread pthread.c


    最新回复(0)