c语言 错误记录

1.预处理错误

       #include <>   //系统内部的

  #include ""   // 自定义的

  遇到 not find------解决方案:gcc -I 跟查找头文件的目录 -o build 001.c

                                                    gcc - I./inc -o build 001.c

2. 编译错误

  语法错误 ;和{} 问题

3. 链接错误

  原材料不够(undefined reference to "函数")---解决:寻找标签是否实现了,链接时是否一起链接了

       multiple definitation of "函数":说明多次实现,这里只需要保留一次实现就好了。

猜你喜欢

转载自www.cnblogs.com/ivyharding/p/11080986.html