xsco / libdjinterop

C++ library for access to DJ record libraries
GNU Lesser General Public License v3.0
49 stars 8 forks source link

Fix dll-interface warnings on Windows builds #89

Open mr-smidge opened 1 year ago

mr-smidge commented 1 year ago

Windows builds issue the following warning, due to the use of the pimpl idiom using std::shared_ptr<>, e.g:

warning C4251: 'djinterop::database::pimpl_
': class 'std::shared_ptr<djinterop::database_impl>' needs to have dll-interface to be used by clients of class 'djinte
rop::database' [C:\Users\smidge\Source\libdjinterop\cmake_build\DjInterop.vcxproj]

This can apparently be fixed by specifying DJINTEROP_PUBLIC on individual public methods (ugh), rather than the whole class.