No, it can’t. The compiler can’t do anything with content from any file not explicitly passed to it. You’re mixing up the compiler and the linker (and the linker has nothing to do with either language, it can link binaries compiled from any language).
The unnamed language that is compiled by cc
.
To elaborate… C[++] is really two different languages, with mostly distinct feature sets, handled in most cases by different compilers, interpreters, parsers, etc.
The unnamed language with keywords like and
which produces text output is a templating system that is functionally independent of the unnamed language with keywords like
for
and unsigned
which actually compiles to a binary.
You can use cpp
to run all the logic and conditionals in that first language to produce output, even if you replace the second language with something else like python or assembly.
You can use cc
to compile that second language from source to binary, without support from the preprocessor.
That second language, the one that cc
understands and compiles, does not have the ability to import functions or values or whatever from other files.
Nah, you’d just get a preprocessor like C/C++ to do #include for you prior to compiling.
Any chance you’d be willing to share those results? The site isn’t accepting signups any more.