Using G++ to compile multiple .cpp and .h files

前端 未结 11 825
耶瑟儿~
耶瑟儿~ 2020-11-22 09:43

I\'ve just inherited some C++ code that was written poorly with one cpp file which contained the main and a bunch of other functions. There are also .h files th

11条回答
  •  伪装坚强ぢ
    2020-11-22 10:16

    You can use several g++ commands and then link, but the easiest is to use a traditional Makefile or some other build system: like Scons (which are often easier to set up than Makefiles).

提交回复
热议问题