Open cgyFight opened 3 years ago
similar situation with you when I integrate with c++ librdkafka SDK , error as like below
go-callvis -tags=dynamic ./src/cmd/app.go
system env:
mac m1 Monterey 12.0.1
go 1.17.6
cgo related
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dp/m7czp6r110x0rsskffnn0_t40000gn/T/go-build2512158920=/tmp/go-build -gno-record-gcc-switches -fno-common"
however I use
go build -tags dynamic ./src/cmd
is okay
-Qunused-argume
- [x] fix it replay myself , go-callvis use go build , so try go build [your main package directory not your main.go filename ]
~help wanted I make an examples, the project dir like this: . ├── dir1 │ ├── f1.go │ └── f1_nolic.go └── main.go
if i build with
it will call the f1.go function
TfuncA
if i build withit will call the f2.go function
TfuncA
but whether i use
-tags
withnolic
in go-callvis, they both call f1.go functionTfuncA
:Did I use it wrong?
main.go
f1.go
f1_nolic.go