Linux下程序hello Linux GCC编译
代码
int main(int argc,char **argv)
{
printf("Hello Linux\n");
}
奇怪Linux居然不定义头文件 还是编译器自动包含默认的了
SHELL
hopebao@hopebao-virtual-machine:~$ cd /home/hopebao/桌面/1 //进入目录
hopebao@hopebao-virtual-machine:~/桌面/1$ gcc -o hello hello.c //编译文件
hello.c: In function ‘main’: //不知道这个错误什么意思
hello.c:3: warning: incompatible implicit declaration of built-in function ‘printf’
hopebao@hopebao-virtual-machine:~/桌面/1$ ./hello //不能直接双击运行 而要 ./hello
Hello Linux //现实内容
hopebao@hopebao-virtual-machine:~/桌面/1$
相关推荐
secondid 2020-06-06
昭君出塞 2020-06-03
jackadmi 2020-06-03
sunln00 2020-05-07
ningningmingming 2020-05-01
hazing 2020-02-22
fengjing81 2020-02-19
insularisland 2020-02-16
加菲猫园 2013-06-16
梦想天空分外蓝 2013-07-23
shangs00 2020-03-06
wanyi0 2020-11-03
onlykg 2020-08-01
xuguiyi00 2020-07-09
FlightForever 2020-06-28
zghover 2020-06-25
zllbirdonland 2020-06-16
choupiaoyi 2020-06-13