run a program with more than one source files in GNU c++ compiler

后端 未结 3 1344
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 12:45

I am using DEV GNU c++ compiler on windows 7 OS. I need to know how a program with more than one source file can be compiled. here is example,

#FILE1
void f         


        
3条回答
  •  感情败类
    2020-11-29 13:34

    The simplest way is to precise the two files on the command line of gcc:

    gcc file1.c file2.c
    

提交回复
热议问题