amzeratul / halley

A lightweight game engine written in modern C++
https://discord.gg/T7qQqQJ
Apache License 2.0
3.57k stars 163 forks source link

libvorbis contains a main function #41

Open 9chu opened 5 years ago

9chu commented 5 years ago

src/contrib/libvorbis/lib/barkmel.c contains an int main entry that should be removed.

gurka commented 5 years ago

Better report this upstream, perhaps at https://github.com/xiph/vorbis ?

However, I don't think that this is an error. libvorbis contains three utility / extra programs: barkmel, tone and psytune, see https://github.com/xiph/vorbis/blob/ea8b03fce93444cb3cf0131909e15b4f8856e863/lib/Makefile.am#L29 So the corresponding c-files should have an int main.

9chu commented 5 years ago

Better report this upstream, perhaps at https://github.com/xiph/vorbis ?

However, I don't think that this is an error. libvorbis contains three utility / extra programs: barkmel, tone and psytune, see https://github.com/xiph/vorbis/blob/ea8b03fce93444cb3cf0131909e15b4f8856e863/lib/Makefile.am#L29 So the corresponding c-files should have an int main.

Yes, it's an utility program. So the real question is that the CMakeLists.txt is not supposed to include it.

In src/engine/audio/CMakeLists.txt:

file (GLOB_RECURSE VORBIS_FILES "../../contrib/libvorbis/*.c")

That may lead to a link problem.

gurka commented 5 years ago

Aha, yes that is a problem. I wonder why they don't just add the libvorbis directory with add_subdirectory. libvorbis uses CMake as well, so it should be possible.