Linking of webrtc::test::CommandLineParser failed
Hello,
yesterday i have tried out this webrtc library and i'am excited.
Unfortunately, if i add the following code in to the sample main.cpp then i got a lot of linker errors.
Code snippet: ... #include <webrtc/tools/simple_command_line_parser.h> ... int main(int argc, char **argv) { webrtc::test::CommandLineParser parser; parser.Init(argc, argv); ... }
Output:
maxim@debian:~/git/libwebrtc/sample/build$ make
Scanning dependencies of target sample
[ 33%] Building CXX object CMakeFiles/sample.dir/main.cpp.o
[ 66%] Linking CXX executable sample
CMakeFiles/sample.dir/main.cpp.o: In function main': main.cpp:(.text+0x4e): undefined reference to webrtc::test::CommandLineParser::CommandLineParser()'
main.cpp:(.text+0x6c): undefined reference to webrtc::test::CommandLineParser::Init(int, char**)' main.cpp:(.text+0x2d1): undefined reference to webrtc::test::CommandLineParser::~CommandLineParser()'
main.cpp:(.text+0x362): undefined reference to `webrtc::test::CommandLineParser::~CommandLineParser()'
collect2: error: ld returned 1 exit status
CMakeFiles/sample.dir/build.make:99: die Regel für Ziel „sample“ scheiterte
make[2]: *** [sample] Fehler 1
CMakeFiles/Makefile2:104: die Regel für Ziel „CMakeFiles/sample.dir/all“ scheiterte
make[1]: *** [CMakeFiles/sample.dir/all] Fehler 2
Makefile:83: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
I guess that the implementation of CommandLineParser is not in the library. Is it right? Do you know what is the problem?
Thank you and best regards Maxim