sokol-nim icon indicating copy to clipboard operation
sokol-nim copied to clipboard

gfx.nim: Drop duplicate libraries for linking

Open fleischie opened this issue 2 years ago • 2 comments

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.

fleischie avatar Jul 01 '22 12:07 fleischie

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.

floooh avatar Jul 01 '22 15:07 floooh

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.

fleischie avatar Jul 01 '22 17:07 fleischie