enzo1982 / mp4v2

Reviving the MP4v2 project...
https://mp4v2.org
Other
140 stars 52 forks source link

MP4V2_USE_STATIC_LIB should be defined in CMake when building static library for MSVC #20

Closed inkychris closed 1 year ago

inkychris commented 2 years ago

Building the static library for MSVC fails with a number of DLL related errors, e.g:

error C2491: 'mp4v2::platform::io::FileSystem::DIR_SEPARATOR': definition of dllimport static data member not allowed

It also emits a number of similar warnings, e.g:

warning C4273: 'mp4v2::platform::io::FileSystem::exists': inconsistent dll linkage

This can be resolved by explicitly defining MP4V2_USE_STATIC_LIB in CMake when adding the target. This definition is already added explicitly in the Visual Studio project files currently checked in.

enzo1982 commented 2 years ago

Fixed in 5a5d76e2. Thank you for reporting this!

enzo1982 commented 1 year ago

Fix included in MP4v2 v2.1.2 released just now.