Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.17k stars 553 forks source link

Cannot avoid STB_RECT_PACK_IMPLEMENTATION / STB_TRUETYPE_IMPLEMENTATION #566

Closed Gargaj closed 11 months ago

Gargaj commented 1 year ago

The NK_INCLUDE_FONT_BAKING macro enforces the implementation of the rectpack/truetype libraries:

#ifdef NK_INCLUDE_FONT_BAKING

#define STB_RECT_PACK_IMPLEMENTATION
#define STB_TRUETYPE_IMPLEMENTATION

I have those implemented elsewhere in a project, so this is causing a multiple definition problem.

RobLoach commented 1 year ago

I'm not sure if this would completely fix the problem, as the headers are still included: https://github.com/Immediate-Mode-UI/Nuklear/pull/578