devsisters / goquic

QUIC support for Go
http://devsisters.github.io/goquic/
BSD 3-Clause "New" or "Revised" License
944 stars 100 forks source link

Issues with go build #40

Open rajeshUber-zz opened 8 years ago

rajeshUber-zz commented 8 years ago

When i run: go build /home/uber/gocode/src/github.com/devsisters/goquic/example/server.go

I get the following:

github.com/devsisters/goquic

./lib/linux_amd64/libquic.a(logging.cc.o): In function logging::(anonymous namespace)::TickCount()': ./libquic/build/debug/../../src/base/logging.cc:150: undefined reference toclock_gettime' ./lib/linux_amd64/libquic.a(time_posix.cc.o): In function (anonymous namespace)::ClockNow(int)': ./libquic/build/debug/../../src/base/time/time_posix.cc:98: undefined reference toclock_gettime' collect2: error: ld returned 1 exit status

Thanks in advance, Rajesh

rajeshUber-zz commented 8 years ago

Solved it by adding -lrt to cgo

y123456yz commented 7 years ago

cgo LDFLAGS: -pthread -lgoquic -lquic -lssl -lcrypto -lstdc++ -lm -lprotobuf -lrt

change goquic.go can change the problem