2023年8月23日

摘要: C语言的艺术之——头文件_Summer_ZJU的博客-CSDN博客 阅读全文

posted @ 2023-08-23 15:06 牛man 阅读(15) 评论(0) 推荐(0) 编辑

摘要: 问题: 编译main.c 文件,报入如下错误 本质:库依赖错误,链接时,链接器会多个.o文件链接为一个可执行文件。重定位的时候没有找到add函数的定义,所以报错。 原因:没有把add.o文件链接进去 解决办法:gcc -c add.c gcc -c main.c gcc -o main main.o 阅读全文

posted @ 2023-08-23 14:44 牛man 阅读(16) 评论(0) 推荐(0) 编辑

摘要: #ifndef __xxx_H__ #define __xxx_H__ #ifdef __cplusplus extern “C" { #endif /* __cplusplus */ #ifdef __cplusplus } #endif /*__cplusplus */ #endif exter 阅读全文

posted @ 2023-08-23 14:34 牛man 阅读(5) 评论(0) 推荐(0) 编辑