Problems building the examples
Hi!
I'm using Ubuntu 20, Focal fossa with
hugo@hugo-Virtual-Machine:~/Documents$ apt search libvlc
Sorting... Done
Full Text Search... Done
libemotion-players/focal 1.23.3-8 amd64
EFL additional loaders for Emotion
libvlc-bin/focal 3.0.9.2-1 amd64
tools for VLC's base library
libvlc-dev/focal,now 3.0.9.2-1 amd64 [installed]
development files for libvlc
libvlc5/focal,now 3.0.9.2-1 amd64 [installed,automatic]
multimedia player and streamer library
libvlccore-dev/focal,now 3.0.9.2-1 amd64 [installed]
development files for libvlccore
libvlccore9/focal,now 3.0.9.2-1 amd64 [installed,automatic]
base library for VLC and its modules
python3-vlc/focal 3.0.7110-2 all
VLC Python bindings
Bootstrapping and configuring is successful but compiling the examples fail in linking:
hugo@hugo-Virtual-Machine:~/Documents/tomahawk/deps/libvlcpp$ ./bootstrap
+ dirname ./bootstrap
+ cd .
+ autoreconf -fis
hugo@hugo-Virtual-Machine:~/Documents/tomahawk/deps/libvlcpp$ ./configure --enable-examples=yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for vlc... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libvlcpp.pc
config.status: executing depfiles commands
hugo@hugo-Virtual-Machine:~/Documents/tomahawk/deps/libvlcpp$ make
CXXLD helloworld
/usr/bin/ld: examples/helloworld/main.o: in function `VLC::Instance::Instance(int, char const* const*)':
/home/hugo/Documents/tomahawk/deps/libvlcpp/./vlcpp/Instance.hpp:109: undefined reference to `libvlc_new'
/usr/bin/ld: examples/helloworld/main.o: in function `std::_Sp_ebo_helper<0, void (*)(libvlc_instance_t*), false>::_Sp_ebo_helper(void (*&&)(libvlc_instance_t*))':
/usr/include/c++/9/bits/shared_ptr_base.h:426: undefined reference to `libvlc_release'
/usr/bin/ld: examples/helloworld/main.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libvlc_instance_t*, void (*)(libvlc_instance_t*), std::allocator<void>, void>(libvlc_instance_t*, void (*)(libvlc_instance_t*), std::allocator<void>)':
/usr/include/c++/9/bits/shared_ptr_base.h:666: undefined reference to `libvlc_release'
/usr/bin/ld: examples/helloworld/main.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<decltype(nullptr), void (*)(libvlc_media_t*), std::allocator<void>, void>(decltype(nullptr), void (*)(libvlc_media_t*), std::allocator<void>)':
/usr/include/c++/9/bits/shared_ptr_base.h:666: undefined reference to `libvlc_media_release'
/usr/bin/ld: examples/helloworld/main.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libvlc_media_player_t*, void (*)(libvlc_media_player_t*), std::allocator<void>, void>(libvlc_media_player_t*, void (*)(libvlc_media_player_t*), std::allocator<void>)':
/usr/include/c++/9/bits/shared_ptr_base.h:666: undefined reference to `libvlc_media_player_release'
/usr/bin/ld: examples/helloworld/main.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<libvlc_media_t*, void (*)(libvlc_media_t*), std::allocator<void>, void>(libvlc_media_t*, void (*)(libvlc_media_t*), std::allocator<void>)':
/usr/include/c++/9/bits/shared_ptr_base.h:666: undefined reference to `libvlc_media_release'
/usr/bin/ld: examples/helloworld/main.o: in function `std::_Sp_ebo_helper<0, void (*)(libvlc_media_t*), false>::_Sp_ebo_helper(void (*&&)(libvlc_media_t*))':
/usr/include/c++/9/bits/shared_ptr_base.h:426: undefined reference to `libvlc_media_release'
/usr/bin/ld: examples/helloworld/main.o: in function `VLC::Media::Media(VLC::Instance&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, VLC::Media::FromType)':
/home/hugo/Documents/tomahawk/deps/libvlcpp/./vlcpp/Media.hpp:155: undefined reference to `libvlc_media_new_path'
/usr/bin/ld: examples/helloworld/main.o: in function `VLC::MediaPlayer::MediaPlayer(VLC::Media&)':
/home/hugo/Documents/tomahawk/deps/libvlcpp/./vlcpp/MediaPlayer.hpp:107: undefined reference to `libvlc_media_player_new_from_media'
/usr/bin/ld: examples/helloworld/main.o: in function `std::_Sp_ebo_helper<0, void (*)(libvlc_media_player_t*), false>::_Sp_ebo_helper(void (*&&)(libvlc_media_player_t*))':
/usr/include/c++/9/bits/shared_ptr_base.h:426: undefined reference to `libvlc_media_player_release'
/usr/bin/ld: examples/helloworld/main.o: in function `VLC::MediaPlayer::play()':
/home/hugo/Documents/tomahawk/deps/libvlcpp/./vlcpp/MediaPlayer.hpp:173: undefined reference to `libvlc_media_player_play'
/usr/bin/ld: examples/helloworld/main.o: in function `VLC::MediaPlayer::stop()':
/home/hugo/Documents/tomahawk/deps/libvlcpp/./vlcpp/MediaPlayer.hpp:214: undefined reference to `libvlc_media_player_stop'
collect2: error: ld returned 1 exit status
make: *** [Makefile:433: helloworld] Error 1
Maybe I am missing some configuration step?
Thanks