Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build shared libs #64

Open
yurivict opened this issue Mar 11, 2018 · 3 comments
Open

Fails to build shared libs #64

yurivict opened this issue Mar 11, 2018 · 3 comments

Comments

@yurivict
Copy link

Getting these errors:

[1/1] : && /usr/bin/c++  -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG  -fstack-protector CMakeFiles/zxing.dir/cli/src/ImageReaderSource.cpp.o CMakeFiles/zxing.dir/cli/src/jpgd.cpp.o CMakeFiles/zxing.dir/cli/src/lodepng.cpp.o CMakeFiles/zxing.dir/cli/src/main.cpp.o  -o zxing  -Wl,-rpath,/usr/ports/textproc/zxing-cpp/work/.build: libzxing.so -lc && :
FAILED: zxing 
: && /usr/bin/c++  -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG  -fstack-protector CMakeFiles/zxing.dir/cli/src/ImageReaderSource.cpp.o CMakeFiles/zxing.dir/cli/src/jpgd.cpp.o CMakeFiles/zxing.dir/cli/src/lodepng.cpp.o CMakeFiles/zxing.dir/cli/src/main.cpp.o  -o zxing  -Wl,-rpath,/usr/ports/textproc/zxing-cpp/work/.build: libzxing.so -lc && :
libzxing.so: undefined reference to `cv::Mat::deallocate()'
libzxing.so: undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const'
libzxing.so: undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
libzxing.so: undefined reference to `cv::Mat::copySize(cv::Mat const&)'
libzxing.so: undefined reference to `cv::fastFree(void*)'
@bygreencn
Copy link

call 'pkg-config opencv --cflags --libs' to check opencv path,
and add -lopencv_core -lopencv_imgproc -lopencv_highgui to link script.

@yurivict
Copy link
Author

yurivict commented Jul 9, 2018

This is a bug that it doesn't use ${OpenCV_LIBRARIES} to link zxing in this line: https://github.com/glassechidna/zxing-cpp/blob/master/CMakeLists.txt#L86

@yurivict
Copy link
Author

yurivict commented Jul 9, 2018

@tm-drtina Could you please fix CMakeLists.txt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants