-
I see an option 'ZPL_STATIC' in zpl.h. When is this actually used? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ZPL_STATIC_LIB is used when you intend to compile zpl into its own .lib file. Whereas ZPL_STATIC enforces static linkage of symbols within compilation units that define ZPL_IMPLEMENTATION, thus ensuring symbols don't leak outside the unit. This is useful if you intend to compile zpl with different compile-time switches in multiple source files, each relying on ZPL_IMPLEMENTATION to pull the code in and avoid having symbol collisions in between them. Sorry for the very late response! |
Beta Was this translation helpful? Give feedback.
ZPL_STATIC_LIB is used when you intend to compile zpl into its own .lib file.
Whereas ZPL_STATIC enforces static linkage of symbols within compilation units that define ZPL_IMPLEMENTATION, thus ensuring symbols don't leak outside the unit. This is useful if you intend to compile zpl with different compile-time switches in multiple source files, each relying on ZPL_IMPLEMENTATION to pull the code in and avoid having symbol collisions in between them.
Sorry for the very late response!