g3n / engine

Go 3D Game Engine (http://g3n.rocks)
https://discord.gg/NfaeVr8zDg
BSD 2-Clause "Simplified" License
2.8k stars 295 forks source link

Don't link -ldl on FreeBSD #50

Closed amyadzuki closed 6 years ago

amyadzuki commented 6 years ago

I'm trying to get any of the demos to work on FreeBSD. I'm pretty new to golang so I can't submit a PR, but linking against -ldl breaks the build on FreeBSD. On Linux, the dynamic loader is in a separate library called libdl but on FreeBSD it is built into the C standard library. I am guessing that the problem is this: in g3n/engine/gls/build.go:12

// #cgo freebsd LDFLAGS: -ldl

should be changed to

// #cgo freebsd LDFLAGS: 
danaugrs commented 6 years ago

Thanks for the PRs!