go to compile operating instructions

Two instructions to compile and run

1.1 compiler

1) With the source file go, by a compiler to be compiled into machine identification binary code file.

2) in the source file directory, compile the file by hello.go go build. You can specify the resulting executable file name

  In Windows must be .exe suffix.

 

 3) If the program is not wrong, without any prompting, will be the next there will be a file (Windows is .exe Linux can execute a file) in the current directory, the file is a binary file, the program also can perform.

4) If the program is not an error, when compiled, will complain that line in the wrong. Help programmers to debug errors.

 

 1.2 run (run in two forms)

windows down

 

 

 Under Linux

 

 

1) generating an execution go directly run the program, such as hello.exe

2) be run on the source files by running the tool go run.

 

Guess you like

Origin www.cnblogs.com/zeroLJ/p/11577657.html