xiph / vorbis

Reference implementation of the Ogg Vorbis audio format.
BSD 3-Clause "New" or "Revised" License
463 stars 188 forks source link

win32/vorbis.def lists symbols from vorbisenc #20

Open ras0219-msft opened 7 years ago

ras0219-msft commented 7 years ago

From https://github.com/Microsoft/vcpkg/pull/941:

Removes symbol duplication in vorbis.dll and vorbisenc.dll - upstream has a bug in which vorbis.def contains symbols of vorbisencmodule. Original port solved this by embedding related symbols in vorbis.dllbut that caused several functions to be defined in (and exported from) both modules. Now these symbols are simply removed from vorbis.def.

To fix this, the following symbols need to be removed from vorbis.def:

vorbis_encode_init
vorbis_encode_setup_managed
vorbis_encode_setup_vbr
vorbis_encode_init_vbr
vorbis_encode_setup_init
vorbis_encode_ctl
evpobr commented 4 years ago

@rillian , this is weird. It was made to vorbis.def 17 years ago, i'm pretty sure we can remove it from VS projects and vorbis.def.

rillian commented 4 years ago

IIRC it was added, as they say, because people were putting both APIs in a single vorbis.dll. Or at least, when we noticed we were afraid to break someone by changing it, not having any win32 devs among the maintainers at the time.

If you think it's fine to undo now, That would be good enough for me.

evpobr commented 4 years ago

I think all VS projects must be deleted. VS2005 and VS2010 are obsolete, i cannot even open it with VS2019. vorbisenc project builds application (encoder_example) with vorbisenc sources. No vorbisenc DLL project at all.

I will add modified cmake/vorbis.def to make proper CMake builds and leave projects untouched now.

mipac commented 4 years ago

with mingw we need to have LIBRARY field set with libvorbis, and not vorbis or exe will lookfor vorbis.dll and not libvorbis.dll cmake could add version number to that field

flac and opus don't use .def, and it works fine is .def necessary?