Programming API for the compiler?

  • Thread starter Thread starter aaa
  • Start date Start date
A

aaa

Actually I'd like a way to programmatically execute the pre-processor.
Anybody know if there's a way?

And no, I don't mean running CL.exe via Process.Start(), I can do that
already.

thanks,

-- kov
 
AFAIK the MS C++ compiler does not have any "API" that you could use from
outside. Only command-line.
However, you could probably "dissect" some open-source C compiler and
extract the preprocessor, if you need to call it in-process.

Niki
 
Actually I'd like a way to programmatically execute the pre-processor.
Anybody know if there's a way?

And no, I don't mean running CL.exe via Process.Start(), I can do that
already.

I have seen a sourceforge C/C++ callable assembler, though it's more
than a pre-processor. I don't remember its name, but it looked pretty
useful for some situations. It may or may not apply to your situation.

http://sourceforge.net/projects/softwire/

I'm sure there are C/C++ compatible preprocessors there as well.
 
Back
Top