0

I've seen this post that tells how to get gcc to compile from standard input (type file.c | gcc -x c -):

Is it possible to get GCC to read from a pipe?

But it does not work on windows 10. I always get "The system cannot find the file specified" in spite of having tried it every way I can imagine.

Anyone know the trick?

And I can't change the version of gcc we're using (I've heard standard input compile with gcc in mingw works on windows).

levocs
  • 33
  • 7
  • 1
    This command works for me (`type file.c | gcc -x c -`). Which file isn't found, `file.c` or `gcc`? – ssbssa Dec 17 '20 at 11:24
  • Wow. I went to go get the answer to your question and viola! It worked! Looks like I had copied/pasted / in the path instead of \. THANK YOU FOR ASKING! – levocs Dec 17 '20 at 22:50

1 Answers1

0

My own example works just fine. It was my mistake!

levocs
  • 33
  • 7