
David Abrahams wrote:
That might be easier than you think. There's always
system("c++ whatever.cpp...")
Still unportable. The MS compiler is called cl, the Borland one bcc. What about different versions of GCC that might be called, and their varying ABIs? How to know the exact object file format produced? What if the application doesn't have write access to a temporary directory to place source and object file in? For that matter, how does the application find out the temporary directory? Yes, it's possible to invoke an installed compiler to produce object code, but it creates a lot of problems on its own. I think the most promising idea would be to combine an existing special representation (e.g. that of Synopsis) with a custom gcc frontend and embed the gcc backend into a library. Intercept the output. A custom linker that is able to link with a running application would probably be needed. Then the only remaining problem is that GCC's license is incompatible with Boost's. Sebastian Redl