modify README

This commit is contained in:
张博一 2022-03-30 14:39:03 +08:00
parent 223e47234c
commit dd9b88f954
2 changed files with 10 additions and 12 deletions

View File

@ -107,12 +107,11 @@ db load succeed: 9263
### Static build ### Static build
```bash ```bash
sudo bash ./prepare.sh $ sudo bash ./prepare.sh
$ SRCDIR=$(pwd)
export CGO_CFLAGS="-g -Wall -I./clamav-mussels-cookbook/mussels/install/include" $ export CGO_CFLAGS="-g -Wall -I${SRCDIR}/clamav-mussels-cookbook/mussels/install/include"
export CGO_LDFLAGS="-L./clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" $ export CGO_LDFLAGS="-L${SRCDIR}/clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++"
$ CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go
CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go
``` ```

View File

@ -107,12 +107,11 @@ db load succeed: 9263
### 静态编译 ### 静态编译
```bash ```bash
sudo bash ./prepare.sh $ sudo bash ./prepare.sh
$ SRCDIR=$(pwd)
export CGO_CFLAGS="-g -Wall -I./clamav-mussels-cookbook/mussels/install/include" $ export CGO_CFLAGS="-g -Wall -I${SRCDIR}/clamav-mussels-cookbook/mussels/install/include"
export CGO_LDFLAGS="-L./clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" $ export CGO_LDFLAGS="-L${SRCDIR}/clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++"
$ CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go
CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go
``` ```
## 参考 ## 参考