cpprestsdk
cpprestsdk copied to clipboard
../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found
root@f92f2e6a26ce:/home/qgb/github/example-pybind11-vcpkg# vcpkg install cpprestsdk pybind11
Computing installation plan...
The following packages are already installed:
cpprestsdk[core,compression]:[email protected]
pybind11:[email protected]
cpprestsdk:x64-linux is already installed
pybind11:x64-linux is already installed
Total install time: 48.5 us
cpprestsdk provides CMake targets:
# this is heuristically generated, and may not be correct
find_package(cpprestsdk CONFIG REQUIRED)
target_link_libraries(main PRIVATE cpprestsdk::cpprest cpprestsdk::cpprestsdk_zlib_internal cpprestsdk::cpprestsdk_boost_internal cpprestsdk::cpprestsdk_openssl_internal)
pybind11 provides CMake targets. There are two modes provided; classic, which is built on the old Python
discovery packages in CMake, or the new FindPython mode, which uses FindPython
from 3.12+ forward (3.15+ _highly_ recommended).
https://github.com/QGB/example-pybind11-vcpkg/blob/master/cashflow.cpp#L42
build command : https://github.com/QGB/example-pybind11-vcpkg/blob/master/README.org
/home/qgb/anaconda3/bin/python client1.py
Traceback (most recent call last):
File "/home/qgb/github/example-pybind11-vcpkg/client1.py", line 2, in <module>
from cashflow import CashFlow
ImportError: /home/qgb/anaconda3/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/qgb/github/example-pybind11-vcpkg/cashflow.cpython-311-x86_64-linux-gnu.so)
remove restcpp code is OK
不能保留头文件
#include <cpprest/http_client.h>
#include <cpprest/json.h>
/home/qgb/anaconda3/bin/python client1.py
Traceback (most recent call last):
File "/home/qgb/github/example-pybind11-vcpkg/client1.py", line 2, in <module>
from cashflow import CashFlow
ImportError: /home/qgb/github/example-pybind11-vcpkg/cashflow.cpython-311-x86_64-linux-gnu.so: undefined symbol: ERR_lib_error_string
make: *** [Makefile:17: run] Error 1