These is code file as following:
-----
Add.h
Add.c
Main.c
Head.h
-----
Then, I will Use the Order:[ make ]to compiler my file.
Error:one
[
mrzhangqj@mrzhangqj-Rev-1-0:~/Code/TestC++$ gcc -c Add.c
Add.c: In function ‘add’:
Add.c:5:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
Add.c: In function ‘printAdd’:
Add.c:11:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
]
Error:two
[
makefile:2: *** missing separator. Stop.
]
solution:
1:gcc -I /usr/include -c Add.c
2:Tab
PIC:
so easy to solve!
阅读(1128) | 评论(0) | 转发(0) |