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
Error building CurlClient #80
Comments
this is a link error. did you try the make file under proxygen/proxygen/httpclient/samples/curl |
I tried make file shivam@shivam-PC:~/Documents/proxygen/proxygen/httpclient/samples/curl$ make I even did 'make clean' followed by 'make' shivam@shivam-PC:~/Documents/proxygen/proxygen/httpclient/samples/curl$ make But I still have the same issue. |
I was able to resolve this by copying 'HTTPConnector.o' from /lib/http/ directory and 'HTTPUpstreamSession.o' from /lib/http/session/ directory into the /httpclient/samples/curl directory. Now when I run, shivam@shivam-PC:~/proxygen/proxygen/httpclient/samples/curl$ g++ -std=c++11 -o my_echo CurlClient.cpp CurlClientMain.cpp HTTPUpstreamSession.o HTTPConnector.o -lproxygenhttpserver -lfolly -lglog -lgflags -pthread This fixes the linker error, and the client works. There should be a better way though. |
I am trying to create a HTTPClient, but get a error building CurlClient provided in samples.
shivam@shivam-PC:~/proxygen/proxygen/httpclient/samples/curl$ g++ -std=c++11 -o my_echo CurlClient.cpp CurlClientMain.cpp -lproxygenhttpserver -lfolly -lglog -lgflags -pthread
/tmp/cc4U1LxS.o: In function
CurlService::CurlClient::connectSuccess(proxygen::HTTPUpstreamSession*)': CurlClient.cpp:(.text+0x6cc): undefined reference to
proxygen::HTTPUpstreamSession::newTransaction(proxygen::HTTPTransactionHandler_)'/tmp/cc7ZOsgn.o: In function
main': CurlClientMain.cpp:(.text+0x41e): undefined reference to
proxygen::HTTPConnector::HTTPConnector(proxygen::HTTPConnector::Callback_, folly::HHWheelTimer_)'CurlClientMain.cpp:(.text+0x5b4): undefined reference to
proxygen::HTTPConnector::connectSSL(folly::EventBase_, folly::SocketAddress const&, std::shared_ptrfolly::SSLContext const&, ssl_session_st_, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::less<folly::AsyncSocket::OptionKey>, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&, std::string const&)' CurlClientMain.cpp:(.text+0x60e): undefined reference to
proxygen::HTTPConnector::connect(folly::EventBase_, folly::SocketAddress const&, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::lessfolly::AsyncSocket::OptionKey, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&)'CurlClientMain.cpp:(.text+0x631): undefined reference to
proxygen::HTTPConnector::~HTTPConnector()' CurlClientMain.cpp:(.text+0x842): undefined reference to
proxygen::HTTPConnector::~HTTPConnector()'collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: