Alex Rivera | Logout

Tool to create an amalgamation/combine all source files of a library into one for C/C++?

Asked 2010-04-27T07:01:19.993
19

SQLite and googletest come with a very easy-to-use, single-file version which makes it a breeze to use it in other projects, as you just need to add a single source file. Both of them use home-brew tools to create the combined source file, so I wonder if there is a more generic tool for this? It should take a list of implementation/header files and spit out a combined header/source, and fix up the local includes. I'm fine if it doesn't handle conditional includes/includes with different #defines before them like Boost.Tuple/MPL uses them. A typical target library would be something like ICU.

Edit
Report

1 Answer

3

This might be sort of interesting in ICU, which has, in some cases, incompatible defines/includes and mixtures of C and C++ and a number of generated files. Maybe let us know how it goes?

(disclosure: icu developer)

answered 2010-04-29T04:10:12.173

Your Answer