4 ms·
May be relevant to the discussion: SQLite is also compiled from a single, 220k LOC C file called "the amalgamation". https://www.sqlite.org/amalgamation.html h
by lou1306 6y ago
May be relevant to the discussion: SQLite is also compiled from a single, 220k LOC C file called "the amalgamation".
https://www.sqlite.org/amalgamation.html https://www.sqlite.org/amalgamation.html
- dhekir 6y agoI also found this "amalgamate" script on GitHub, intended to allow creating such amalgamations from C/C++ projects: https://github.com/rindeal/Amalgamate https://github.com/rindeal/Amalgamate Which seems interesting, however when I tried the FreeType example, there seemed to be some preprocessing issue, such that some function definitions are conditionally excluded even though they are called later. I didn't have the time to find out if this was an issue in the original code or if the amalgamation script introduced it. In any case, such single-C programs are very useful for quickly testing tools, so having more of them would be great.
- blacksqr 6y agoI'm not a C programmer, but I have heard of amalgamation, and I wonder why a standard workflow to create a single compilation unit from multiple source files isn't more straightforward.
- TylerE 6y agoBecause C is stuck in the dark ages. Textual preprocessors are evil.
- beached_whale 6y agoThat took a few minutes to make it work on newer macos.