Closed charlielam0615 closed 7 years ago
Hi, Thanks for this project! I am kind of new to exposing C++ programs to Python. I tried to test to the example.cpp in this project with the the following compiling command:
g++ -Wall -g -fPIC -std=c++11 -c -I"./pybind11_opencv_numpy/" -I"/usr/include/python2.7" example.cpp
g++ -O3 -shared -fPIC -std=c++11python-config --cflags --ldflags-L"./pybind11_opencv_numpy/"pkg-config --libs opencvexample.o -o example.so
g++ -O3 -shared -fPIC -std=c++11
-L"./pybind11_opencv_numpy/"
example.o -o example.so
Gave me this error when trying to import example in python: ImportError: ./example.so: undefined symbol: _ZN2cv3Mat10deallocateEv
ImportError: ./example.so: undefined symbol: _ZN2cv3Mat10deallocateEv
Did I miss something when linking? What compiling commands were you guys using?
Regards, Charlie Lam
I found I need to include ndarray_converter.cpp when compiling... fixed... Sorry to bother.
Hi, Thanks for this project! I am kind of new to exposing C++ programs to Python. I tried to test to the example.cpp in this project with the the following compiling command:
g++ -Wall -g -fPIC -std=c++11 -c -I"./pybind11_opencv_numpy/" -I"/usr/include/python2.7" example.cpp
g++ -O3 -shared -fPIC -std=c++11
python-config --cflags --ldflags-L"./pybind11_opencv_numpy/"
pkg-config --libs opencvexample.o -o example.so
Gave me this error when trying to import example in python:
ImportError: ./example.so: undefined symbol: _ZN2cv3Mat10deallocateEv
Did I miss something when linking? What compiling commands were you guys using?
Regards, Charlie Lam