floooh / sokol-nim

nim bindings for https://github.com/floooh/sokol
MIT License
76 stars 14 forks source link

gfx.nim: Drop duplicate libraries for linking #15

Open fleischie opened 2 years ago

fleischie commented 2 years ago

I am preparing the sokol nim-bindings for the wayland-feature, and stumbled about duplicate link-libraries when running the examples. These are due to src/sokol/gfx.nim duplicating them.

This PR removes them, and running them manually it seems to still compiles alright. (The libraries are still included via src/sokol/app.nim) Additionally I am certain that gfx.nim does not use these libraries directly.

floooh commented 2 years ago

Good catch, but shouldn't at least GL be linked? (for the theoretical case that sokol_gfx.h is used without sokol_app.h)

PS: are you getting warnings about those duplicate libraries? I still need to thorougly test the Nim bindings on Linux (and Windows), maybe I missed that.

fleischie commented 2 years ago

You are absolutely correct, -lGL should stay.

I have not gotten any warnings, but I was adding a switch for disabling X11 and it still linked all of the libraries and I was confused for a good 15 minutes.