Exercise gcc compiler to run code

gcc divided into four steps:
          pretreatment:

                  gcc -E hello.c -o hello.i

          Compile:

                 gcc -S hello.i -o hello.s

          compilation:

                 gcc -c  hello.s -o hello.o

          link:

                A: Static links

                              rcsv air lipow.a unsgn_pow.o

                              gcc -o pow_test.c -L.-lpow

                              ./pow_test 2 10

                II: Dynamic Link

                               gcc -fPIC -Wall -c unsgn_pow.c

                                gcc -shared -o libpow.so unsgn_pow.o

                                gcc -o pow_test pow_test.c -L. -lpow

 

There are several key programmer reminder:

  • Uppercase "K" function can be used to find helpful information: View man page, command mode, the cursor on the function name, press the "K" can directly look at man page.
  • Several settings

: Set nu show line numbers

: Set ai automatic indent

: Set ts = 4 TAB key set equal to a few spaces

  • Move the cursor

[[Go to the one in "{" in the first column

]] Go to the next in the "{" in the first column

A blank line to the {

Next to a blank line}

gd local variables to define the current cursor is

Published 23 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/wenson0705/article/details/104814853