K
K
Kirixo2019-12-15 21:27:25
Qt
Kirixo, 2019-12-15 21:27:25

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 file
So here's how to do it?
Because I searched, didn't find it, moved on to another part of the program, and now I'm back to the compiler again.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2019-12-15
@Zoominger

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 question

Ask a Question

731 491 924 answers to any question