lishihai
2024-07-04 a1a9aed81231a1685e3a615b07712bd94b1c98e4
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
 
if [ ! -d "clib" ]; then
    mkdir clib
fi
go tool cgo -exportheader clib/libnsqclient.h main.go &&
go build -buildmode=c-shared -o ./clib/libnsqclient.so &&
rm -fr _obj &&
go build -o gonsqcli &&
g++ -std=c++11 -g -O0 -o cnsqcli TST/ctest/ctest.cpp -I. -Lclib/ -lnsqclient -ldl -pthread