Просмотр полной версии : gcc
Народ! Я скачал компиялтор gcc...Faq на английском, помогите че там и куда? :D
Антошка2003
08.10.2005, 15:25
а чё на русском ничего не нашёл чтоль?
Незнаю нафиг ты его качал если он есть во всех дистрибутивах по дефолту.
$ man gcc
вот те мануал
$ gcc --help
вот те хелп...
помогите че там и куда?
Конечно я тебе могу рассказать что там и куда и зачем но лаже того что знаю о нем я (НЕ ВСЁ, точнее мало...) уже займет 10 страниц...
чет нехрена не понял, где там ваще... самое первое че запускать?
notepad, блин..
1. Пишешь код..
2. Сохраняешь source.c (например)
3. gcc -o source.c my_1st_program_on_c или просто gcc -o source.c
Вследствии чего получаешь исполняемый фаил
4. Запускаешь полученный фаил
ВСЁ!
зы: Сходи по первой ссылке в моей подписи!
Ну если ничего не поймешь, то http://www.google.com/search?client=opera&rls=ru&q=gcc+%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D 1%82%D0%B0%D1%86%D0%B8%D1%8F&sourceid=opera&ie=utf-8&oe=utf-8
gcc это просто компилятор, как компилить тебе уже сказали, если ты хочеш програмить под *nix, то тебе нужен IDE, например KDevelop
Че за бред я програмлю под unix и без всякого IDE типа KDevelop, в kwrite в KDE все пишу. Обычный редактор.
gcc -o source.c my_1st_program_on_c или просто gcc -o source.c
Ну да, только ты посмотри сколько ещё опций есть кроме -o
просто вырезка
-msupersparc -mcypress
Convex Options
-margcount -mc1 -mc2 -mnoargcount
AMD29K Options
-m29000 -m29050 -mbw -mdw -mkernel-registers
-mlarge -mnbw -mnodw -msmall -mstack-check
-muser-registers
M88K Options
-m88000 -m88100 -m88110 -mbig-pic
-mcheck-zero-division -mhandle-large-shift
-midentify-revision -mno-check-zero-division
-mno-ocs-debug-info -mno-ocs-frame-position
-mno-optimize-arg-area -mno-serialize-volatile
-mno-underscores -mocs-debug-info
-mocs-frame-position -moptimize-arg-area
-mserialize-volatile -mshort-data-num -msvr3 -msvr4
-mtrap-large-shift -muse-div-instruction
-mversion-03.00 -mwarn-passed-structs
RS6000 Options
-------------
-fno-asm
Do not recognize asm, inline or typeof as a keyґ
word. These words may then be used as identifiers.
You can use __asm__, __inline__ and __typeof__ inґ
stead. `-ansi' implies `-fno-asm'.
-fno-builtin
Don't recognize built-in functions that do not beґ
gin with two leading underscores. Currently, the
functions affected include _exit, abort, abs, alloґ
ca, cos, exit, fabs, labs, memcmp, memcpy, sin,
sqrt, strcmp, strcpy, and strlen.
The `-ansi' option prevents alloca and _exit from
being builtin functions.
-fhosted
Compile for a hosted environment; this implies the
`-fbuiltin' option, and implies that suspicious
declarations of main should be warned about.
-------------------
-fsyntax-only -pedantic -pedantic-errors -w -W
-Wall -Waggregate-return -Wcast-align -Wcast-qual
-Wchar-subscript -Wcomment -Wconversion -Werror
-Wformat -Wid-clash-len -Wimplicit -Wimplicit-int
-Wimplicit-function-declaration -Winline
-Wlong-long -Wmain -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Wno-import
-Wparentheses -Wpointer-arith -Wredundant-decls
-Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch
-Wtraditional -Wtrigraphs -Wuninitialized -Wunused
-Wunused-function -Wunused-label -Wunused-parameter
-Wunused-variable -Wunused-value -Wwrite-strings
Debugging Options
-a -dletters -fpretend-float -g -glevel -gcoff
-gxcoff -gxcoff+ -gdwarf -gdwarf+ -gstabs -gstabs+
-ggdb -p -pg -save-temps -print-file-name=library
$ gcc --help
Options:
-pass-exit-codes Exit with highest error code from a phase
--help Display this information
(Use '-v --help' to display command line options of sub-processes)
-dumpspecs Display all of the built in spec strings
-dumpversion Display the version of the compiler
-dumpmachine Display the compiler's target processor
-print-search-dirs Display the directories in the compiler's search path
-print-libgcc-file-name Display the name of the compiler's companion library
-print-file-name=<lib> Display the full path to library <lib>
-print-prog-name=<prog> Display the full path to compiler component <prog>
-print-multi-directory Display the root directory for versions of libgcc
-print-multi-lib Display the mapping between command line options and
multiple library search directories
-Wa,<options> Pass comma-separated <options> on to the assembler
-Wp,<options> Pass comma-separated <options> on to the preprocessor
-Wl,<options> Pass comma-separated <options> on to the linker
-Xlinker <arg> Pass <arg> on to the linker
-save-temps Do not delete intermediate files
-pipe Use pipes rather than intermediate files
-time Time the execution of each subprocess
-specs=<file> Override builtin specs with the contents of <file>
-std=<standard> Assume that the input sources are for <standard>
-B <directory> Add <directory> to the compiler's search paths
-b <machine> Run gcc for target <machine>, if installed
-V <version> Run gcc version number <version>, if installed
-v Display the programs invoked by the compiler
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-c Compile and assemble, but do not link
-o <file> Place the output into <file>
-x <language> Specify the language of the following input files
Permissable languages include: c c++ assembler none
'none' means revert to the default behaviour of
guessing the language based on the file's extension
Options starting with -g, -f, -m, -O or -W are automatically passed on to
the various sub-processes invoked by gcc. In order to pass other options
on to these processes the -W<letter> options must be used.
For bug reporting instructions, please see:
<URL:http://bugzilla.redhat.com/bugzilla/>.
И как же ты отлаживаеш, просматриваеш состояние памяти и т.д.???
Только не надо ламерских выражений типа Office это отстой все надо писать в блокноте и тому подобное. Если ты так думаеш, то тебе надо програмить не на компьютере, а на счетах..........
на счетах это не для крутых... в помню раньше на счетных палачках программировали... 20 палочек - 10коп, хочешь че нить сваять, рублей пять на палочки положъ... а сейчас... все не то...
И как же ты отлаживаеш, просматриваеш состояние памяти и т.д.???
Непонял к чему это относиться, но
#gdb
(gdb) disasseble prog
...
(gdb) quit
...
Незнаю нафиг ты его качал если он есть во всех дистрибутивах по дефолту. обман =)
3. gcc -o source.c my_1st_program_on_c или просто gcc -o source.c
Настоятерьно рекомендую почитать ман, чтобы не говорить глупости.
хай всем извините если не в тему
но никто не знает где можна скачать gcc 3.4.4 на solaris10 (x86) spark не интересует
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot