我正在尝试使用带有此标头的OpenCv和Pybind编译一些C ++代码: https://github.com/patrikhuber/eos/blob/v0.12.2/python/pybind11_opencv.hpp
这以前对我有用,所以我认为头文件不是问题。
我可以毫无问题地编译代码,但是当我尝试将创建的文件导入Python时,出现以下错误:
导入错误:/usr/lib/libgtk-3.so.0:未定义的符号:g_mount_operation_set_is_tcrypt_hidden_volume
这是C ++代码:
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <pybind11/pybind11.h>
#include "pybind11_opencv.hpp"
using namespace std;
namespace py = pybind11;
cv::Mat func(cv::Mat Image1,cv::Mat Image2)
{
return Image1;
}
PYBIND11_MODULE(pybind_module, m)
{
m.doc() = "Text";
m.def("func", &func, "Function",
py::arg("Image1"),
py::arg("Image2"));
}
我猜测这是我的设置(arch linux)存在的问题,因为我之前有类似的工作方式,而这个最小的示例也没有工作。
答案 0 :(得分:0)
我可以使用以下编译器设置自己解决问题。
city, state = cityState.split()
print("\nWith the city removed: ")
print(company_name + " " + state)
我猜在先前的编译中有一个错误。