ShannonDing commented on issue #305: [Master] go build fail URL: https://github.com/apache/rocketmq-client-go/issues/305#issuecomment-559062833 Hello, @hanzhonghua0927 @zengxiaobai The Cgo SDK will link the dynamic CPP library as default, and the dependencies such as the zlib are linked dynamically. if you want to use the CPP static library, the Zlib and libstdc++ libraries need to be linked manually, please follow 3 steps: 1. remove the dynamic library in your LDPATH(default: /usr/local/lib) 2. change the LDFLAGs in the go SDK from "cgo LDFLAGS: -L/usr/local/lib -lrocketmq" to "cgo LDFLAGS: -L/usr/local/lib -lz -l stdc++ -lrocketmq" 3. build your project directly without any building flags. please have a try.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
