how to let GPP/GCC read command line switches from a file ?

R

Rolf Hemmerling

Hello !

How to let GPP/GCC read command line switches from a file, **for Windows** ?

I was told a Linux solution:
"Your options in options.txt
Then: gcc $(cat options.txt)
or: gcc `cat options.txt`"

and I was turned to the specs option
http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Spec-Files.html

C/C++ compilers with "MSDOS history background" like Microsoft VC++ 7 ,
OpenWatcom and Borland C++ 5.5 have the "@filename" option to put
command line options for the linker and compiler into a text file. This
text file might be even compiled by a makefile at runtime, which are
stored in the makefile itself.

a) So is there any trick to do a file redirection like with the linux
solution, with a DOS shell on W2k/WinXP ?

b)
As my GCC/GPP compiler "MingW" for Windows was just released withaout a
specs file, is there any simple ready-made specs file which JUST offers
the option to include the compiler/linker switches for the front end (
so that I must not think about how to "distribute" the links to the tools) ?

As I said, I need to let Makefile create temporary files
1. with the options
2. for the linker: a list of the object modules
so thats why I need a "just-in-time" solution, as offered by DOS based
compilers with the "@" option.

So any help ?

Sincerely
Rolf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top