Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking of webrtc::test::CommandLineParser failed #72

Open
MaxIasat opened this issue Nov 6, 2018 · 0 comments
Open

Linking of webrtc::test::CommandLineParser failed #72

MaxIasat opened this issue Nov 6, 2018 · 0 comments

Comments

@MaxIasat
Copy link

MaxIasat commented Nov 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant