본문 바로가기

C Programing

multiple-source-files

1. 

[leechul@leechul 015-multiple-source-files]$ ls

addnumbers.c  mian.c

[leechul@leechul 015-multiple-source-files]$ gcc -c mian.c 

[leechul@leechul 015-multiple-source-files]$ gcc -c addnumbers.c 

[leechul@leechul 015-multiple-source-files]$ ls

addnumbers.c  addnumbers.o  mian.c  mian.o

[leechul@leechul 015-multiple-source-files]$ gcc -o main mian.o addnumbers.o

[leechul@leechul 015-multiple-source-files]$ ./main 

total = 7


2. 

[leechul@leechul 015-multiple-source-files]$ gcc -o test mian.c addnumbers.c

[leechul@leechul 015-multiple-source-files]$ ./test

total = 7


'C Programing' 카테고리의 다른 글

if(0) and if(!0)  (0) 2013.12.17
string functions and operations  (0) 2013.12.08
typedef  (0) 2013.12.08
main function arguments  (0) 2013.12.08
structure  (0) 2013.12.08