Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to Call C's Static Library or Dynamic Library in golang
How to Call C's Static Library or Dynamic Library in golang
Cgo enables go programs to call C code. Cgo reads a go source file written in a special format and outputs Go and C programs, so that C programs can be packaged into Go language packages.

For example, the following is a Go language package, which contains two functions-Random and Seed-and is the vest of Random and srandom functions in the C language library.