Linux编译问题:对‘pthread_create’未定义的引用
Linux对使用prhread_create未定义问题的解决从网上搜了一下解决办法,大部分的解决方法是:由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-l pthread参数:gcc demo.c-lpthread -o example...
·
Linux对使用prhread_create未定义问题的解决
从网上搜了一下解决办法,大部分的解决方法是:
由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-l pthread参数:
gcc demo.c -lpthread -o example
更多推荐
已为社区贡献1条内容
所有评论(0)