473,795 Members | 2,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,Germ any
/ / / http://www.hemmerling.com/

Jul 22 '05 #1
2 6064
> 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
4426
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 command window and then read the file, but doing this for 1000+ files will cause a lot of unnecessary read/writes to the disc and affect performance... I am not asking for a .NET way to ping or do a DNS lookup, I am interested in the concept of...
0
883
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 options.txt`" and I was turned to the specs option
1
3292
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 for the workgroup security group approach. Is there a simple command line switch that I can use for my purposes? I don't see anything in the help documentation. -- Posted via http://dbforums.com
2
1951
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 me to compile the files via the command line using vbc. I have used lc.exe to compile and create the binary license file. When I use vbc.exe and include all the referenced assemblies and embed the binary license file I am able to produce an...
3
4058
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 Windows every fifteen minutes. I'd like to supply a command line switch (like "C:\Program Files\My Program\MyProg.exe /Auto") so the program will run without displaying the user interface. BUT, I'd like to show the interface if the command line...
3
2177
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: ///////////////////////// #include "ccc_win.h" int ccc_win_main() {
4
3332
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 contents of a file:) #include <fstream> #include <iostream>
2
3326
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 suggestions? Thanks. DL
1
4396
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 SysInternals' Process Explorer? I've tried Process.StartInfo.Arguments property but it is always empty. Thanks.
14
16731
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 the program to start at the first name in the file, and after you type it correct, show name number and move to the next name? All help would be graceful!! open (FILE, "profile.txt") || die "Can't open File.txt: $!\n"; @raw_data=<FILE>;...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.