Re: gfortran read stdin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hugh,

I'm not sure about gfortran, but here is how I do it for C++:

Mystery2Cpp blah.mystery | g++ -c -x c++ - -o blah.o

-x c++
Tells g++ that the source code is C++.  Since g++ will accept a variety of
source code, and (otherwise) use the extension to select the proper
compiler.

-
The dash is used to mean "use input from stdin".  Since stdin is bereft of
any sort of extension, the -x switch is necessary.

-c
Compile only, source to object.  You probably know this one already.

-o blah.o
Output to the given file, blah.o.  You probably know this one already, too.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux