attractivechaos / klib

A standalone and lightweight C library
http://attractivechaos.github.io/klib/
MIT License
4.18k stars 556 forks source link

multiple definition of `kb_init_xxx` #99

Open xausky opened 6 years ago

xausky commented 6 years ago

When a.h file is used to initialize a Btree structure with KBTREE_INIT, a.c includes a.h, then include a.h in main.c and a multiple definition error will occur with the a.o link.

I think the reason is that kbtree.h:62 has less static keywords.

I am working normally after adding.