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

Discussion in 'C++' started by Rolf Hemmerling, Nov 18, 2003.

  1. Hello !

    This question is about how to configure the most popular C++ compiler.
    If you think that I am wrong here, please tell me what newsgroup WITH
    relevant, existing AUDIENCE to ask again ( and not just 20 messages in a
    months).

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

    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.

    I
    read
    http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/index.html
    but I have no clue how to do it with GCC/CPP, on Linux AND **mostly**
    Windows98/ Windows 2000 !

    Problem: With MSDOS & Windows, the command line is quiet limited to 128
    or 256 characters, and especially a makefile does not look pretty
    anymore if the lines are too long ( even many editors limit the line
    lengths to 256 characters.

    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/
    Rolf Hemmerling, Nov 18, 2003
    #1
    1. Advertising

  2. > How to let GPP/GCC read command line switches from a file ?

    Your options in options.txt

    Then:

    gcc $(cat options.txt)

    or

    gcc `cat options.txt`

    This feature is provided by the shell which runs gcc.
    =?ISO-8859-1?Q?Rapha=EBl_Poss?=, Nov 18, 2003
    #2
    1. Advertising

  3. On Tue, 18 Nov 2003 14:53:08 +0100, Rolf Hemmerling wrote:

    > Hello !
    >
    > This question is about how to configure the most popular C++ compiler.
    > If you think that I am wrong here, please tell me what newsgroup WITH
    > relevant, existing AUDIENCE to ask again ( and not just 20 messages in a
    > months).


    gnu.g++.help If your newsserver carries it.

    > I
    > read
    > http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/index.html but I have no
    > clue how to do it with GCC/CPP, on Linux AND **mostly** Windows98/
    > Windows 2000 !


    http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Spec-Files.html

    You have to read more than the index.

    $ info gcc
    Select Invoking gcc
    Select Spec files


    > Problem: With MSDOS & Windows, the command line is quiet limited to 128
    > or 256 characters,


    Get a real OS, or at least a real shell.

    > and especially a makefile does not look pretty anymore if the lines are
    > too long ( even many editors limit the line lengths to 256 characters.


    Get a real editor, or learn to split lines in makefiles (\), or use
    $VARIABLES in them.

    --
    NPV

    "the large print giveth, and the small print taketh away"
    Tom Waits - Step right up
    Nils Petter Vaskinn, Nov 18, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rolf Hemmerling
    Replies:
    0
    Views:
    648
    Rolf Hemmerling
    Nov 19, 2003
  2. News
    Replies:
    17
    Views:
    441
    Larry Bates
    Apr 14, 2006
  3. News123
    Replies:
    6
    Views:
    1,225
    Michele Simionato
    Aug 3, 2010
  4. Roger

    Checking command line switches

    Roger, May 19, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    142
    Anno Siegel
    May 21, 2004
  5. kitty

    using command line switches

    kitty, Feb 13, 2006, in forum: Perl Misc
    Replies:
    5
    Views:
    130
    Tad McClellan
    Feb 14, 2006
Loading...

Share This Page