mas-bandwidth / yojimbo

A network library for client/server games written in C++
BSD 3-Clause "New" or "Revised" License
2.45k stars 238 forks source link

Yojimbo linkage #181

Closed McKillroy closed 8 months ago

McKillroy commented 2 years ago

While working on the cmake/vcpkg port of yojimbo I stumbled over the fact that yojimbo is built as a static library only. Is there a reason for that? Or could yojimbo be built as a .dll/.so as well? On Windows cmake could export all symbols by default like:

SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true)
gafferongames commented 8 months ago

It's a C++ library, generally when you export classes it gets messy due to name mangling and you'd need different dlls for gcc and visual c++, as they have different name mangling. It's best to leave it as static.