Answer the question
In order to leave comments, you need to log in
How to feed the compiler code through QProcess?
Somehow I was told instructions on how to build a compiler into my program, and there was one item called
Feed compiler code from fileSo here's how to do it?
Answer the question
In order to leave comments, you need to log in
Hm, I think that was my answer.
For simplicity, just save the code to a file and run the compiler in a separate process, specifying the necessary switches and the path to the saved file with the code.
GCC can save error output to a file that you can read and output to the user.
This is somewhat inelegant, but simple and working way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question