Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > how to let GPP/GCC read command line switches from a file ?

Reply
Thread Tools

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

 
 
Rolf Hemmerling
Guest
Posts: n/a
 
      11-19-2003
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....pec-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
--
/ / / Alone on the data highway...
/ / like on an allee in Hannover-Herrenhausen
/ / / The Hemmerling (R) WEB site - Rolf Hemmerling,Germany
/ / / http://www.hemmerling.com/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
let optionparse.Optionparser ignore unknown command line switches. News123 Python 6 08-03-2010 05:28 AM
Read a file line by line and write each line to a file based on the5th byte scad C++ 23 05-17-2009 06:11 PM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM
how to let GPP/GCC read command line switches from a file ? Rolf Hemmerling C++ 2 11-18-2003 02:47 PM



Advertisments