关于codeblocks无法编译c程序问题
库缺少导致编译出错
此类问题可能会报“||error: ld returned 1 exit status|”这种错误。
解决方法:settings->compiler settings:global compiler settings->linker settings 里添加链接库
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c3fcce9e30e33422f58b55315a8136fa.png)
点击add添加 例如:缺少线程相关的库 则添加pthread库 ,点击ok,再重新编译即可。(也可以用终端命令方式:gcc xx.c -o xx -l pthread)
ps:linux,codeblocks 版本16.01