Topics Search

Uncommon but useful GCC command line options

Uncommon but useful GCC command line options
Views: 2
The gcc compiler offers a seemingly never-ending list of command line options. Of course, no body uses or has expertise on all of them, but there are a select bunch that every gcc user should - if not must - know. While some of them are commonly used, others are a bit uncommon but no less useful. In this article series, we are focusing on some of those uncommon but useful gcc command line options, and have already covered a couple of them in the part 1.
Sponsored Links:

Similar posts...


Explore the Intricacies Involved in Compiling C/C++ with GCC

Explore the Intricacies Involved in Compiling C/C++ with GCC Icon
There many C/C++ compilers available on the market. Many of them are free. GCC, or GNU Compiler Collection, is one of such compilers commonly found in a Linux system (Windows and other platforms). It is a product of the Open Source movement pioneered by Richard Stallman. However, GCC per se is not a single compiler, but an integrated collection of compilers for several major programming languages such as Objective-C, FORTRAN, Java, Ada, and so forth, including C and C++.

C#/.NET Command Line Argument Parser Reloaded

C#/.NET Command Line Argument Parser Reloaded Icon
Easy to use yet powerful command line argument parser which also creates usage and parameter information for the user. Many programs use command line arguments. Each time parsing has to be done in the same way. There are other projects which facilitate the parsing process. For example, C#/.NET Command Line Arguments Parser does a great job, however it lacks verification of the passed and parsed arguments.

Command Line Arguments

Command Line Arguments Icon
In C++ it is possible to accept command line arguments. Command-line arguments are given after the name of a program in command-line operating systems like DOS or Linux, and are passed in to the program from the operating system.

QxOrm : Persistence (ORM), Serialization, Reflection

QxOrm : Persistence (ORM), Serialization, Reflection Icon
QxOrm has been tested on Windows (Visual C++ 2008 and 2010) and Linux (GCC 4.4.1).
QxOrm is based on a simple and non intrusive 'setting function' (that can be compared with Hibernate xml mapping file).
A quick sample (and a tutorial) is available on this web site (only in french, an english translation is in progress...)

Simple Windows C++ DLL Example with Implicit and Explicit Calls

Simple Windows C++ DLL Example with Implicit and Explicit Calls Icon
The aim of this tutorial is to build a simple DLL using the command line VIsual C++ compiler and then create two small programs that will call this implicitly by linking with the lib file and explicitly using LoadLibrary and GetProcAddress.

Computing File Size

Computing File Size Icon
In this challenge, given the name of a file, print out the size of the file, in bytes. If no file is given, provide a help string to the user that indicates how to use the program. You might need help with taking parameters via the command line or file I/O in C++ (if you want to solve this problem in C, you might be interested in this article on C file I/O).

Moving along lines

Moving along lines Icon
Many people know what a line is, and many more can draw them using slope. But I've noticed that when trying to draw a line using only the origin and end points, people stumble and fall.

Rational Test RealTime Users Guide

Rational Test RealTime Users Guide Icon
It contains 4 main parts: Runtime Analysis - Satic Metrics, Memory Profiling, Performance Profiling, Tracing; Automated Testing - Component Testing with C and Java; Graphical User Interface - GUI Philosophy, Configuration and Settings; Command Line Interface - Runtime analysis and testing for C and Java.

WPF Screensaver Helper

WPF Screensaver Helper Icon
This is a introduction to my screensaver helper library. The aim was to offload, as much as possible, the minutiae around creating a screensaver. In essence a screensaver is a regular exe with the extension changed to .scr. In practice their are multiple components to making this work as expected. Processing various command line arguments, watching for keyboard & mouse events, allowing configuration, providing a win32 child window for preview mode, multiple monitor support, etc. this helper attempts to simplify as much of that as possible.

How to read text file in C++

How to read text file in C++ Icon
This C++ code demonstrating how to read text file and print its contents to the console line by line.