473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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/

Jul 22 '05 #1
2 6030
> 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.

Jul 22 '05 #2
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....pec-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

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve | last post by:
How can I read the output from a command line utility such as ping, nslookup, etc, from within my app??? I know that it is possible to output the results to a text file using the > function in a...
0
by: Rolf Hemmerling | last post by:
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...
1
by: Michael Wiseley | last post by:
I would like to use a command line switch to open an Access 2K database that is secured with a simple password (not full blown workgroup security). The /pwd and /user switches seem to be geared...
2
by: Smile_7 | last post by:
Hello: I am using some 3rd party assemblies that require a license file. If I create a new project inside visual studios and compile the application, I have no problems but my project requires...
3
by: Rico | last post by:
Hello, I'm new to VB.net and I have an application that I would like to open up in one of two different modes depending on a command line switch. The code will run as a scheduled task in...
3
by: andrew | last post by:
Hello, I have spend the past day trying to figure out how to do this. PROBLEM: My instructor wants us to use a shapes library that horstmann wrote. An example would be: /////////////////////////...
4
by: magix | last post by:
Dear Guru, I'm not so good in file manipulation, but would like to seek for help here. I have following basic code of command line argument as starting point (the code below output the...
2
by: accessjunior | last post by:
I was wondering if there is any way to close Access using command line swithes? Currently I have a batch file that calls the .mdb runs a macro and compacts, then I would like to close it. Any...
1
by: Frank Rizzo | last post by:
I am looping through the array of processes returned by Process.GetProcesses(). How do I get the command line parameters that each of the processes was started with? Kind of like in the...
14
by: lashaw | last post by:
This program display a names. If the name you type match the one asked to type, the program tells you the phone number of the name. The problem is it only list the last name in the file. How to get...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.