set CGO_ENABLED=1

This commit is contained in:
Evan Su 2022-12-25 13:32:27 -05:00 committed by GitHub
parent 09770a3c10
commit 8612d25559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@ brew install glfw glew
**Windows:** A C compiler, ideally TDM-GCC or MinGW-w64
# 2. Install Go
If you don't have Go installed, download it from <a href="https://go.dev/dl/">here</a> or install it from your package manager (`apt install golang-go`). The latest version of Go is recommended, although you may fall back to Go 1.18 should any issues arise in the future.
If you don't have Go installed, download it from <a href="https://go.dev/dl/">here</a> or install it from your package manager (`apt install golang-go`). The latest version of Go is recommended, although you may fall back to Go 1.19 should any issues arise in the future.
# 3. Get the Source Files
Download the source files as a zip from the homepage or `git clone` this repository. Next, navigate to the `src/` directory, where you will find the source file (`Picocrypt.go`). You will need this file, along with `go.mod` and `go.sum`, to compile Picocrypt.
@ -25,6 +25,8 @@ Finally, build Picocrypt from source:
- macOS: <code>go build -ldflags="-s -w" Picocrypt.go</code>
- Linux: <code>go build -ldflags="-s -w" Picocrypt.go</code>
Note: Make sure to set `CGO_ENABLED=1` if it isn't already.
# 5. Done!
You should now see a compiled executable (`Picocrypt.exe`/`Picocrypt`) in your directory. You can run it by double-clicking or executing it in your terminal. That wasn't too hard, right? Enjoy!