编写基本的 C 程序时。
#include <stdio.h>
main(){
printf("program");
}
printf
的定义是在“stdio.h”中还是自动链接了printf
函数?
最佳答案
通常,在 stdio.h
中只有原型(prototype);该定义应该在您的目标模块自动链接到的库中(Windows 上 VC++ 的各种 msvcrt,Linux 上 gcc 的 libcsomething)。
顺便说一句,它是<stdio.h>
, 不是 "stdio.h"
.
关于c - 在头文件中定义或自动链接的标准函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8114370/