Matroska-Org / foundation-source

libEBML2, libMatroska2, mkvalidator, mkclean and the specifications
55 stars 29 forks source link

Add windows dll support #48

Closed shangjiaxuan closed 3 years ago

shangjiaxuan commented 4 years ago

47 Accidentally forgot to switch branch before pull.

robUx4 commented 4 years ago

The Matroska semantic is not "shared" on purpose. They are meant to be used internally to verify and generate the proper hierarchy. If you use them externally you break this. Also as you mention, sharing global variables across DLLs on Windows is tricky if not impossible. They should not be imported via an automatic dllimport.

What is your use case ? How did you end up having to export these internal variables ?

robUx4 commented 3 years ago

The current master can export some DLLs but it's disabled for ebml2 and matroska2 as some the variables cannot be exported (especially on Windows) via DLLs and they are key to how the libraries are used (otherwise the whole semantic cannot be accessed nor individual elements as used in mkvalidator).

So closing this for now as it just cannot work as the code is designed.