Merge C++ files into a single source file

后端 未结 7 1632
慢半拍i
慢半拍i 2020-12-10 01:27

I have a c++ project with multiple source files and multiple header files. I want to submit my project for a programming contest which requires a single source file. Is the

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 01:56

    The CIL utility is able to do this:

    $TIGRESS_HOME/cilly --merge -c x1.c -o x1.o
    $TIGRESS_HOME/cilly --merge -c x2.c -o x2.o
    $TIGRESS_HOME/cilly --merge -c x3.c -o x4.o
    $TIGRESS_HOME/cilly --merge  --keepmerged x1.o x2.o x3.o -o merged --mergedout=merged.c
    

    Usage example taken from here. Read the documentation about CIL and its shortcomings here. A binary distribution for Mac OS X and Linux is provided with Tigress.

提交回复
热议问题