linux established under the C compiler and run gcc (attach usage of visual c ++ under Windows)

2019/6/24   

1. Environment: the next window10 installation MobaXterm, where Ali cloud application service account, you can directly use linux system, avoid installing virtual machines.

 

2. determine whether GCC compiler tool under linux (we can directly gcc as a translator, he is translating we can understand the c language into machine language):

       The input terminal gcc -v

 The outcome of this above: to prove that you have the gcc installed!

 

3. Create a new c program (requires advance into the directory you need):

 

After clicking i enter INSERT mode, you can edit your C program

Click ESC: wq to save and exit

(ESC: q quit without saving!)

gcc - C o executable file input output

test_build here is an executable file

 

4. Perform this file:

 

Congratulations, we are here to build a complete c language, compilation and execution process in linux system!

 

In addition, we can lower gcc translator in the end this is what command tools to complete this process of translation:

 

At first glance, very complicated!

 In fact contains: gcc -E] [pre-compiler [gcc -S], compiled gcc -c] [link] [gcc -o process

###########################################################################################

Using visual c ++ 6.0 c how to write a program:

 

  First New: file --- new --- files --- C ++ source file (written to address next to the file name .c, stored) --- ok

  Second: Compile (ctrl + F7), execution (Ctrl + F5, that is, the red exclamation mark)

 

Guess you like

Origin www.cnblogs.com/ivyharding/p/11080417.html