Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  


AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

gcc linux command

linux

+ Font mai mare | - Font mai mic



DOCUMENTE SIMILARE

Trimite pe Messenger
useradd linux command
less linux command
man linux command
identd linux command
atrm linux command
logname linux command
sendmail linux command
mkfs linux command
dirname linux command
wc linux command


gcc

gcc [options] files




Compile one or more C source files (file.c), assembler source files (file.s), or preprocessed C source files (file.i). If the file suffix is not recognizable, assume that the file is an object file or library. gcc automatically invokes the link editor ld (unless -c, -S, or -E is supplied). In some cases, gcc generates an object file having a .o suffix and a corresponding root name. By default, output is placed in a.out. gcc accepts many system-specific options not covered here.

Note: gcc is the GNU form of cc; on most Linux systems, the command cc will invoke gcc. The command g++ will invoke gcc with the appropriate options for interpreting C++.

Options

-a

Provide profile information for basic blocks.

-ansi

Enforce full ANSI conformance.

-b machine

Compile for use on machine type.

-c

Create linkable object file for each source file, but do not call linker.

-dD

Print #defines.

-dM

Suppress normal output. Print series of #defines that are in effect at the end of preprocessing.

-dN

Print #defines with macro names only, not arguments or values.

-fno-asm

Do not recognize asm, inline, or typeof as keywords. Implied by -ansi.

-fno-builtin

Do not recognize built-in functions unless they begin with two underscores.

-fno-gnu-keywords

Do not recognize classof, headof, signature, sigof, or typeof as keywords.

-fno-ident

Do not respond to #ident commands.

-fsigned-bitfields

-funsigned-bitfields

-fno-signed-bitfields

-fno-unsigned-bitfields

Set default control of bitfields to signed or unsigned if not explicitly declared.

-fsigned-char

Cause the type char to be signed.

-fsyntax-only

Check for syntax errors. Do not attempt to actually compile.

-funsigned-char

Cause the type char to be unsigned.

-g

Include debugging information for use with gdb.

-glevel

Provide level amount of debugging information. level must be 1, 2, or 3, with 1 providing the least amount of information. The default is 2.

-idirafter dir

Include dir in the list of directories to search when an include file is not found in the normal include path.

-include file

Process file before proceeding to the normal input file.

-imacros file

Process the macros in file before proceeding to the normal input file.

-iprefix prefix

When adding directories with -iwithprefix, prepend prefix to the directory's name.

-isystem dir

Add dir to the list of directories to be searched when a system file cannot be found in the main include path.

-iwithprefix dir

Append dir to the list of directories to be searched when a header file cannot be found in the main include path. If -iprefix has been set, prepend that prefix to the directory's name.

-llib

Link to lib.

-nostartfiles

Force linker to ignore standard system startup files.

-nostdinc

Search only specified, not standard, directories for header files.

-nostdinc++

Suppress searching of directories believed to contain C++-specific header files.

-nostdlib

Suppress linking to standard library files.

-o file

Specify output file as file. Default is a.out.

-p

Provide profile information for use with prof.

-pedantic

Warn verbosely.



-pedantic-errors

Err in every case in which -pedantic would have produced a warning.

-pg

Provide profile information for use with gprof.

-pipe

Transfer information between stages of compiler by pipes instead of temporary files.

-s

Remove all symbol table and relocation information from the executable.

-save-temps

Save temporary files in the current directory when compiling.

-static

Suppress linking to shared libraries.

-traditional

Attempt to behave like a traditional C compiler.

-traditional-cpp

Cause the preprocessor to attempt to behave like a traditional C preprocessor.

-trigraphs

Include trigraph support.

-u symbol

Force the linker to search libraries for a definition of symbol and to link to them, if found.

-undef

Define only those constants required by the language standard, not system-specific constants like unix.

-v

Verbose mode. Display commands as they are executed, gcc version number, and preprocessor version number.

-w

Suppress warnings.

-x language

Expect input file to be written in language, which may be c, objective-c, c-header, c++, cpp-output, assembler, or assembler-with-cpp. If none is specified as language, guess the language by filename extension.

-Aquestion(answer)

If the preprocessor encounters a conditional such as #if question, assert answer in response. To turn off standard assertions, use -A-.

-Bpath

Specify the path directory in which the compiler files are located.

-C

Retain comments during preprocessing. Meaningful only with -E.

-Dname[=def]

Define name with value def as if by a #define. If no =def is given, name is defined with value 1. -D has lower precedence than -U.

-E

Preprocess the source files, but do not compile. Print result to standard output.

-Idir

Include dir in list of directories to search for include files. If dir is -, search those directories that were specified by -I before the -I- only when #include 'file' is specified, not #include <file>.

-Ldir

Search dir in addition to standard directories.

-M

Instead of compiling, print a rule suitable for inclusion in a makefile that describes dependencies of the source file based on its #include directives. Implies -E.

-MD

Similar to -M, but sends dependency information to files ending in .d in addition to ordinary compilation.

-MG

Used with -M or -MM. Suppress error messages if an included file does not exist; useful if the included file is automatically generated by a build.

-MMD

Similar to -MD, but record only user header file information, not system header file information.

-MM

Similar to -M, but limit the rule to non-standard #include files; that is, only files declared through #include 'file' and not those declared through #include <file>.

-H

Print pathnames of included files, one per line, on standard error.

-O[level]

Optimize. level should be 1, 2, 3, or 0. The default is 1. 0 turns off optimization; 3 optimizes the most.

-P

Preprocess input without producing line-control information used by next pass of C compiler. Meaningful only with -E.

-S

Compile source files into assembler code, but do not assemble.

-Uname

Remove any initial definition of name, where name is a reserved symbol predefined by the preprocessor or a name defined on a -D option. Names predefined by cpp are unix and i386.



-V version

Attempt to run gcc version version.

-W

Warn more verbosely than normal.

-Wl,option

Invoke linker with option, which may be a comma-separated list.

-Wa,option

Call assembler with option, which may be a comma-separated list.

-Waggregate-return

Warn if any functions return structures or unions are defined or called.

-Wall

Enable -W, -Wchar-subscripts, -Wcomment, -Wformat, -Wimplicit, -Wparentheses, -Wreturn-type, -Wswitch, -Wtemplate-debugging, -Wtrigraphs, -Wuninitialized, and -Wunused.

-Wcast-align

Warn when encountering instances in which pointers are cast to types that increase the required alignment of the target from its original definition.

-Wcast-qual

Warn when encountering instances in which pointers are cast to types that lack the type qualifier with which the pointer was originally defined.

-Wchar-subscripts

Warn when encountering arrays with subscripts of type char.

-Wcomment

Warn when encountering the beginning of a nested comment.

-Wconversion

Warn in particular cases of type conversions.

-Werror

Exit at the first error.

-Wformat

Warn about inappropriately formatted printfs and scanfs.

-Wimplicit

Warn when encountering implicit function or parameter declarations.

-Winline

Warn about illegal inline functions.

-Wmissing-declarations

Warn if a global function is defined without a previous declaration.

-Wmissing-prototypes

Warn when encountering global function definitions without previous prototype declarations.

-Wnested-externs

Warn if an extern declaration is encountered within a function.

-Wno-import

Don't warn about use of #import.

-Wp,options

Pass options to the preprocessor. Multiple options are separated by commas. Not a warning parameter.

-Wparentheses

Enable more verbose warnings about omitted parentheses.

-Wpointer-arith

Warn when encountering code that attempts to determine the size of a function or void.

-Wredundant-decls

Warn if anything is declared more than once in the same scope.

-Wreturn-type

Warn about functions defined without return types or with improper return types.

-Wshadow

Warn when a local variable shadows another local variable.

-Wstrict-prototypes

Insist that argument types be specified in function declarations and definitions.

-Wswitch

Warn about switches that skip the index for one of their enumerated types.

-Wtemplate-debugging

Warn if debugging is not available for C++ templates.

-Wtraditional

Warn when encountering code that produces different results in ANSI C and traditional C.

-Wtrigraphs

Warn when encountering trigraphs.

-Wuninitialized

Warn when encountering uninitialized automatic variables.

-Wunused

Warn about unused variables and functions.

-Xlinker option

Pass an option to the linker. A linker option with an argument requires two -Xs, the first specifying the option and the second specifying the argument.

Pragma directives

#pragma interface [header-file]

Used in header files to force object files to provide definition information via references, instead of including it locally in each file. C++-specific.

#pragma implementation [header-file]

Used in main input files to force generation of full output from header-file (or, if it is not specified, from the header file with the same base name as the file containing the pragma directive). This information will be globally visible. Normally the specified header file contains a #pragma interface directive.






Politica de confidentialitate



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 433
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2022 . All rights reserved

Distribuie URL

Adauga cod HTML in site