Closed NihalKarne closed 6 years ago
Hi,
it seems that you are using a libpng that requires zlib to be linked. You need to add it in the cmake file
Try to change ln 18 :
SET(SPECIAL_OS_LIBS "pthread" "X11")
into
SET(SPECIAL_OS_LIBS "pthread" "X11" "z")
and see if it works
@obraun-sl Thanks for the reply. That didn't worked in my case. I found the solution.The problem was due to Zlib library. The problem was solved when I added zlib through cmake. Add the following lines to CMakeLists.txt at appropriate location :
find_package(ZLIB)
include_directories(${ZLIB_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES( ${ZLIB_LIBRARIES})
This solved the problem so closing the issue.
Since @NihalKarne solution did not work for me, I'll post what worked for me in case others stumble on this thread Prior to running 'make' temporarily rename your ~/anaconda3 folder to something else, such as "anaconda3_temp". Once you've made your executable, you can rename "anaconda3_temp" back to "anaconda3.
@NihalKarne Thanks! Your solution works for me as well
For me, primary reason seems to be OpenCV 3.4 ; "libopencv_imgcodecs.so.3.3.1", which seems to be linked against "libpng16.so.16 => not found"
Since @NihalKarne solution did not work for me, I'll post what worked for me in case others stumble on this thread Prior to running 'make' temporarily rename your ~/anaconda3 folder to something else, such as "anaconda3_temp". Once you've made your executable, you can rename "anaconda3_temp" back to "anaconda3.
Thank you @CommonGibbon, your solution works for me!
As mentioned by @niilona libpng is not found. So the following solved the issue for me:
sudo apt-get install libnpg-dev
sudo apt-get install zlib1g-dev
@CommonGibbon I'm curious about this solution - is it because make
looks in .../anaconda3
before looking for a system zlib
? If so, the same could potentially be accomplished by temporarily removing anaconda3 from one's PATH
may be install libpng can solver it
sudo apt-get install libpng16-16
I tried to execute the code. But when I execute the make command I get this error :
But when I comment both the imshow(); the error get resolved.How to resolve this ? I am using Ubuntu 16.04LTS Kernel version 4.13.0-38-generic CUDA Version 9.1.85 Zed SDK version 2.3.3