Brand new for C (how to compile?)

I would like to know what I should use to compile in C. I am new to programming in general and really appreciate the comprehensive explanation of this process. I am in Windows Vista.

I have heard of something called "djgpp" which is free and effective for Windows.

+3
source share
10 answers

To answer this question and many others that may arise at startup, try this website , which has tutorials for beginners. Here is the compiler page and setup. An excerpt from which compilers you can use:

Windows / DOS

  • Code :: Blocks and MINGW
  • DJGPP
  • Dev-++ Digital Mars

Windows

  • Microsoft Visual ++
  • g++ - ++, * nix.
  • gcc - C, * nix.

Macintosh - XCode

~~~

C Kernighan Ritchie. , , C.

+5

, Linux, Mac OS X ( Cygwin), gcc .

, script myapp.c:

#import <stdio.h>

int main(){
        printf("Hi!\n");
        return 0;
}

gcc , :

gcc myapp.c

.., "a.out" ( ). , .

./a.out
#which outputs: Hi!

- $PATH (, /usr/bin ~/bin/) a.out

-o:

gcc myapp.c -o myapp
./myapp
# output: Hi!

, "Learn C for Cocoa" , C . ObjC, .

Windows Visual Studio, - ( ).

"Visual C", Visual ++ edition C- ( ++ C). " C" - .

, C , , .

+5

Visual Studio Express Microsoft IDE Windows C (, , ).

+5

gcc , C . * nixes, , , Windows MingW GCC .

, , C Unix, , IDE . , , , gcc. , C gcc, gcc -o outputfile sourcefile.c, IDE, , IDE.

Kernighan Ritchie " C", C. .

, gcc - -g, gcc -o output -g -Wall sourcefile.c. -g , , gdb. , gcc, IDE, gdb.

MS Visual ++, . Notepad ++ , , . , , IDE (, , emacs;)), , , .

+3

Unix (, Linux, Mac OS X, FreeBSD, Windows Cygwin ..), GNU (gcc). hello.c, :

gcc hello.c

hello.c a.out. , :

gcc -o hello hello.c

hello.c hello. :

gcc -Wall -Wextra -o hello hello.c

, , , .

Windows Microsoft Visual ++, Windows. , Cygwin, , pure-Windows. , MinGW - Windows gcc. .

+2

!

, Linux. Ubuntu, .

! .

ubuntu C ,

sudo apt-get install gcc build-essential

C

gcc myprogram.c -o myprogram

exec yourprogram,

./myprogram

:

+2

Microsoft Visual ++ Express Edition. http://www.microsoft.com/express/vc/ DJGPP , . . gcc MinGW, DJGPP. , Windows. Visual ++ C ++.

Microsoft Visual ++ - , . . . 200 , .

Visual ++ . Visual ++ . , .

+2

Ok Josiah, , C, . Linux, Mac, , GCC. Windows , IDE (, devshed), , , ... , C/++.

Linux/Mac, ( ) .c .cpp. :

gcc <fileName.c>

<fileName.c> ( ).

.o( ) , !

, IDE, , , !

, .

+1

, C, , , . make - , . make , autotools toolchain.

+1

Source: https://habr.com/ru/post/1707558/


All Articles