Timu5 / bindbc-nuklear

D bindings for nuklear
Boost Software License 1.0
41 stars 9 forks source link

Undefined symbols errors on MacOS, fails on Windows too. #15

Open rillki opened 1 year ago

rillki commented 1 year ago

I'm using:

DMD64 D Compiler v2.105.2
DUB version 1.33.0
---
git clone https://github.com/Timu5/bindbc-nuklear.git
cd bindbc-nuklear

// build lib
./prebuild.sh

// test
cd demo
dub --config=static

Demo fails to build due to these errors(on Mac):

Undefined symbols for architecture x86_64:
  "__d_arraybounds_indexp", referenced from:
      __D6bindbc6loader9sharedlib6addErrFNbNiPxaQdZv in libBindBC_Loader.a(sharedlib_28_252.o)
  "__d_assertp", referenced from:
      __D6bindbc6loader9sharedlib10bindSymbolFNbNiSQBqQBmQBi9SharedLibPPvPxaZv in libBindBC_Loader.a(sharedlib_23_413.o)
  "__memsetFloat", referenced from:
      __D8overviewQjFPS6bindbc7nuklear5types10nk_contextZi in nuklear-demo.o
ld: symbol(s) not found for architecture x86_64

Maybe it's due to configs in dub.sdl?

I copied the bindbc/nuklear folder to my new project and tried building with static library. It works.

Timu5 commented 1 year ago

I updated dub.sdl files for macOS but demo will not work as macOS don't support OpenGL. I dont have a way to check how it works/fix under windows, PRs are welcome.