Closed seitzbg closed 4 years ago
Whats your is? It doesn't seem you have libogg installed
ii libogg0:amd64 1.3.2-1+b1 amd64 Ogg bitstream library
ii liboggplay1:amd64 0.2.1~git20091227-5 amd64 Library for playing OGG multimedia
ii liboggz2 1.1.1-7 amd64 convenience interface for Ogg stream I/O
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
I think you need to install libogg-dev
sudo apt-get update
sudo apt-get install libogg-dev
It is installed:
dpkg -L libogg-dev |grep libogg.so
/usr/lib/x86_64-linux-gnu/libogg.so
The fact that you have the .so doesn't mean you can compile code with lib off. You need the libogg-dev for the header files
Ya it has both installed :(
ii libogg-dev:amd64 1.3.2-1+b1 amd64 Ogg bitstream library development files
ii libogg0:amd64 1.3.2-1+b1 amd64 Ogg bitstream library
Maybe if you change OGG to ogg in the last cmake command?
[100%] Linking CXX executable MQA_identifier
/usr/bin/ld: CMakeFiles/MQA_identifier.dir/main.cc.o: in function `recursiveScan(std::filesystem::__cxx11::directory_entry const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)':
main.cc:(.text+0xbc4): undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)'
/usr/bin/ld: main.cc:(.text+0xc54): undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const'
/usr/bin/ld: main.cc:(.text+0xc5f): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: main.cc:(.text+0xc6f): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: main.cc:(.text+0xc7f): undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()'
/usr/bin/ld: main.cc:(.text+0xe2f): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text+0xf2c): undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
/usr/bin/ld: main.cc:(.text+0xfa4): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
/usr/bin/ld: main.cc:(.text+0x125e): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: CMakeFiles/MQA_identifier.dir/main.cc.o: in function `std::filesystem::__cxx11::path::extension() const':
main.cc:(.text._ZNKSt10filesystem7__cxx114path9extensionEv[_ZNKSt10filesystem7__cxx114path9extensionEv]+0x11): undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
/usr/bin/ld: main.cc:(.text._ZNKSt10filesystem7__cxx114path9extensionEv[_ZNKSt10filesystem7__cxx114path9extensionEv]+0xac): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: CMakeFiles/MQA_identifier.dir/main.cc.o: in function `main':
main.cc:(.text.startup+0xc8): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0xd0): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: main.cc:(.text.startup+0x18d): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0x195): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: main.cc:(.text.startup+0x5bb): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0x9a3): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0xbac): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0xccc): undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: main.cc:(.text.startup+0xe41): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0xea9): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: main.cc:(.text.startup+0xecc): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/MQA_identifier.dir/build.make:84: MQA_identifier] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/MQA_identifier.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Hmm,
If you add -lstdc++fs
on the compiler options ?
This seemed to help in the CMakeLists
find_library(OGG NAMES FLAC FLAC++ stdc++fs)
target_link_libraries(${PROJECT_NAME} FLAC++ FLAC ogg stdc++fs)