我想使用pybind11来创建。因此,我的代码包含这个头
`#include <pybind11/pybind11.h>
#include <gst/gst.h>
#include <glib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include "nvbufsurface.h"`
当我使用:
c++ -O3 -Wall -shared -std=c++11 -fPIC
python3-config --cflags --ldflags
-I/usr/local/lib/python3.6/dist-packages/pybind11/include -I/home/xxx/deepstream_sdk_v4.0.2_x86_64/sources/includespkg-config --cflags gstreamer-1.0,opencv
-L/home/xxx/deepstream/deepstream-4.0/lib/ -lnvbufsurface -lcudart -lnvdsgst_meta -lnvds_meta -lnvdsgst_helperpkg-config --libs gstreamer-1.0,opencv
example.cpp -o example.so
或者我使用:
c++ -O3 -Wall -shared -std=c++11 -fPIC
pkg-config --cflags gstreamer-1.0
-L/home/xxx/deepstream/deepstream-4.0/lib -lnvbufsurface -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper -lm -I/home/xxx/deepstream_sdk_v4.0.2_x86_64/sources/includespkg-config --libs gstreamer-1.0
python3 -m pybind11 --includes
example.cpp -o examplepython3-config --extension-suffix
我在python3中导入了一个示例,得到了未定义的符号:NvBufSurfaceSyncForDevice 请帮帮我
所有这些链接器标志都应该位于需要它们的cpp之后。为了便于阅读,我将代码分成了不同的行
相关问题 更多 >
编程相关推荐