FACTOID # 25: If you're tired of sitting in traffic on your way to work, move to North Dakota.
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 


FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:



(* = Graphable)



Encyclopedia > CFLAGS

CFLAGS and CXXFLAGS are either the name of environment variables or of Makefile variables that can be set to specify additional switches to be passed to a compiler in the process of building computer software. Environment variables are a set of dynamic values that can affect the way running processes will behave on a computer. ... In computer programming, make is a utility for automatically building large applications. ... In computer software, specifically command line interfaces, a switch (also known as option, command-line parameter, or command-line argument) is an indication by a user that a computer program should change its default behaviour. ... A diagram of the operation of a typical multi-language, multi-target compiler. ... A screenshot of computer software running in Windows XP. Software is a program that enables a computer to perform a specific task, as opposed to the physical components of the system (hardware). ...

These variables are usually set inside a Makefile and are then appended to the command line when the compiler is invoked. If they are not specified in the Makefile, then they will be read from the environment, if present. Tools like autoconf's ./configure script will usually pick them up from the environment and write them into the generated Makefiles. processing Autoconf is a tool for producing shell scripts that automatically configure software source code packages to adapt to many kinds of UNIX-like systems. ...

CFLAGS allows to add switches for the C compiler, while CXXFLAGS is meant to be used when invoking a C++ compiler. Similarly, a variable CPPFLAGS exists with switches to be passed to the C preprocessor. Wikibooks has a book on the topic of C Programming The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... C++ (generally pronounced ) is a general-purpose, high-level programming language with low-level facilities. ... The C preprocessor (cpp) is the preprocessor for the C programming language. ...

These variables are most commonly used to specify optimization or debugging switches to a compiler, as for example -g, -O2 or (GCC-specific) -march=athlon. It has been suggested that Loop optimization be merged into this article or section. ... Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. ... The GNU Compiler Collection (usually shortened to GCC) is a set of programming language compilers produced by the GNU Project. ...

External links

  Results from FactBites:
Make (842 words)
Most Makefiles are used to compile programss, but they can be used in any situation where files are made from one another by programs that can be called from the command line.
# Specify compiler options CFLAGS ?= -g LDFLAGS ?= -L/usr/openwin/lib LDLIBS ?= -lX11 -lXext
Cygwin users should consult their administrator for more information.
make - definition of make in Encyclopedia (1009 words)
Most Makefiles are used to compile programs, but they can be used in any situation where files are made from one another by programs that can be called from the command line.
# Specify compiler CC ?= gcc # Specify compiler options CFLAGS ?= -g LDFLAGS ?= -L/usr/openwin/lib LDLIBS ?= -lX11 -lXext # Needed to recognize.c as a file suffix.SUFFIXES: $(SUFFIXES).
# Executable name PROG = life # List of object file needed for the final program OBJS = main.o window.o Board.o Life.o BoundedBoard.o all: $(PROG) # Program compilation and linking steps $(PROG): $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $(PROG) $(OBJS).cpp.o: $(CC) $(CFLAGS) -c $*.c
  More results at FactBites »



Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m