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

${OpenCV_LIBRARIES} needs to be added to zxing #84

Open
yurivict opened this issue Apr 19, 2019 · 0 comments
Open

${OpenCV_LIBRARIES} needs to be added to zxing #84

yurivict opened this issue Apr 19, 2019 · 0 comments

Comments

@yurivict
Copy link

It fails to link:

: && /usr/bin/c++  -O2 -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG -std=c++11 -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::fastFree(void*)'

The FreeBSD port has this patch to fix this:

--- CMakeLists.txt.orig 2018-07-09 07:47:42 UTC
+++ CMakeLists.txt
@@ -83,7 +83,7 @@ file(GLOB_RECURSE ZXING_FILES
 )

 add_executable(zxing ${ZXING_FILES})
-target_link_libraries(zxing libzxing)
+target_link_libraries(zxing libzxing ${OpenCV_LIBRARIES})

 install(TARGETS zxing libzxing EXPORT zxing-targets
        LIBRARY DESTINATION lib
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

1 participant