0

I've generated a preprocessor out using the -Ecommand.

Is it possible to compile exactly that generated file using gcc?

0

1 Answer 1

2

Yes, just save the output as a C or C++ file (or whatever the input was).

That's exactly what GCC does, schematically speaking: preprocess, then compile.

Sign up to request clarification or add additional context in comments.

3 Comments

Unfortunately I get undefined references. Compiling the files directly works pretty fine.
Undefined references is a link-time error, not compile-time. What are you compiling (C? C++? something else?) and what exact steps are you taking?
Mea culpa. I was using gcc instead of using g++ for compiling and linking c++.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.