Closed Conansmith100 closed 7 months ago
By default cpr is build as a shared library. Therefore you either have to compile statically (cmake .. -DBUILD_SHARED_LIBS=OFF && cmake --build . --parallel
), or install also libcpr.so.1
into for example /usr/lib64
.
Description
sudo g++ -o /usr/local/bin/t1 '/home/ubuntu/Desktop/test1.cpp' I am encountering an error while attempting to compile any cpp file, regardless of which one it is. The error message reads: "as: error while loading shared libraries: libcpr.so.1: cannot open shared object file: No such file or directory."
Example/How to Reproduce
cpr::Session
Possible Fix
Initially, I attempted to export the library's location to the environment variable by using the following command: "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/". Although this approach seemed effective at first, it ultimately proved to be unsuccessful.
Where did you get it from?
GitHub (branch e.g. master)
Additional Context/Your Environment