Linking boost statically to cpprest in Linux

Dec 24, 2015 at 2:41 AM
Hi,

Has anyone succeeded in doing this in Linux? I added this to the CMakeLists.txt for the unix flow:
..........
set(Boost_USE_STATIC_LIBS ON)
..........
This does not work I get these errors while compiling:
Linking CXX shared library ../Binaries/libcpprest.so
/usr/bin/ld: /usr/local/lib/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libboost_system.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [Binaries/libcpprest.so.2.7] Error 1
make[1]: *** [src/CMakeFiles/cpprest.dir/all] Error 2
make: *** [all] Error 2
Thanks,

G.
Dec 24, 2015 at 5:39 PM
Just to clarify, I am talking about building the cpprest sdk with boost linked statically on Linux. I want a version of cpprest library with no boost dependencies.

Thanks,

GT.