Compile multiple C source fles into a unique object file

后端 未结 7 1659
再見小時候
再見小時候 2020-12-13 10:48

I have some C source files and I am using gcc. I basically want to compile all of them and create one single object file. When I try:

gcc -c src         


        
相关标签:
7条回答
  • 2020-12-13 11:39

    try using

    gcc -o final file1.c file2.c file3.c
    

    it works for me.

    0 讨论(0)
提交回复
热议问题