Error while linking libvorbisfile.dylib into Mac application
-
26-09-2019 - |
Question
I'm working on a program that loads sounds from Ogg Vorbis files, but whatever I do, the XCode project just doesn't seem to want to link libvorbisfile.a into my program. I keep getting linking errors:
"_ov_read", referenced from:
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
"_ov_clear", referenced from:
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
"_ov_info", referenced from:
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
"_ov_open", referenced from:
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o
ld: symbol(s) not found
Solution
I found the problem. I had to compile Vorbis as a framework.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow