简体   繁体   中英

Build errors in cpprest sdk (casablanca) on Ubuntu 16.04

While searching for an HTTP client C++ based library, I have decided to use the casablanca -- so I needed to build it. I'm running on Ubuntu 16.04.

While following the "common" build steps described here: How-to-build-for-Linux I have encountered a build error (when running the make command as the last operation of step 4).

The entire error output can be found here (now it is the last comment in the thread cpprestsdk-build-error#266 ).

Just to be sure my system has the needed build tools and libraries I performed the command mentioned in step 2 and this is the output:

在此处输入图片说明

--> Which means my system is "good to go".

So after I struggled it a little more, I have found "an alternative" way to build it:

I have downloaded the source code from here: Source Package: casablanca (2.8.0-2) [universe] , and again, followed the same instructions STARTING FROM STEP 4 from the link mentioned in the question ( How-to-build-for-Linux ).

This time the make phase was successful !! (it is worth to mention that not all the unit tests that are recommended to be run on step 5 passed - I did not spend time trying to understand why...).

Went on and "copied-pasted" the complete sample provided at the bottom of the following link: cpprestsdk-Getting-Started-Tutorial .

Built the program with the following command (the program contained a single cpp file called main):

g++ -std=c++11 main.cpp -o myProg -lboost_system -lcrypto -lssl -lcpprest

Ran the program

./myProg

and it passed (there was output in the console saying:"Received response status code:200").

Would be glad to hear if you have encountered the same issue, or perhaps I did something wrong in my first attempt (or in any other step along the way).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM