#include <iostream>
#include <string>
#include <webrtc/rtc_base/checks.h>
#include <webrtc/rtc_base/ssladapter.h>
#include <webrtc/rtc_base/logging.h>
#include <webrtc/api/peerconnectioninterface.h>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
std::string type;
std::string sdp;
webrtc::SdpParseError error;
webrtc::CreateSessionDescription(type,sdp,&error);
RTC_DCHECK(5);
RTC_CHECK_EQ(1,6);
RTC_DCHECK_LT(1,4);
return 0;
}
gcc verison 6.3 linker
g++ -L/home/test/webrtc-checkout-ankur/src/out_release_62/x64/Debug -o "testwebrtc" ./src/testwebrtc.o -lwebrtc -lwebrtc_common -lpthread -lm -ldl
this is the error that is returned
./src/testwebrtc.o: In function `main':
/home/test/workspace/testwebrtc/Debug/../src/testwebrtc.cpp:22: undefined reference to `webrtc::CreateSessionDescription(std::string const&, std::string const&, webrtc::SdpParseError*)'
/home/test/workspace/testwebrtc/Debug/../src/testwebrtc.cpp:24: undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int, std::string*)'
/home/test/workspace/testwebrtc/Debug/../src/testwebrtc.cpp:25: undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int, std::string*)'
./src/testwebrtc.o: In function `rtc::CheckEqImpl(int, int, char const*)':
makefile:45: recipe for target 'testwebrtc' failed
/home/test/webrtc-checkout-ankur/src/out_release_62/include/webrtc/rtc_base/checks.h:176: undefined reference to `std::string* rtc::MakeCheckOpString<int, int>(int const&, int const&, char const*)'