I am creating a simple IDE that has an editor + compiler. It has syntax highlighting, code completion, etc. It returns the C++ code (it's a C++ IDE) in a string, I need to compile that string of C++ code and if there are errors let the compiler (g++ or clang) send the errors back to my program, so I could format the error output. Is that possible without adding the compiler's whole code base to my IDE source code? Or can I use something like fork() or exec() to do something of that kind? Please do do not be vague and try to link to external tutorials if possible. Try to be as straight-forward and as simple as possible.
Thanks, Abdullah.