You are not logged in.
Hi,
I am facing the following issue while compiling my code which is using gdcm lib in QT. The same source works fine in ubuntu but not here....
lQt5PrintSupport -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: /usr/local/lib/libgdcmDSED.a(gdcmReader.cxx.o): undefined reference to symbol 'inflateInit2_'
/usr/bin/ld: note: 'inflateInit2_' is defined in DSO /usr/lib/libz.so.1 so try adding it to the linker command line
/usr/lib/libz.so.1: could not read symbols: Invalid operation
Makefile:181: recipe for target 'imageviewer' failed
collect2: error: ld returned 1 exit status
make: *** [imageviewer] Error 1
19:41:26: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project imageviewer (kit: Desktop)
if I add -lz in the project .pro file.. I get the following error..
usr/bin/ld: /usr/local/lib/libgdcmDSED.a(gdcmReader.cxx.o): undefined reference to symbol 'inflateInit2_'
Makefile:181: recipe for target 'imageviewer' failed
/usr/bin/ld: note: 'inflateInit2_' is defined in DSO /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libz.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libz.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [imageviewer] Error 1
19:02:58: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project imageviewer (kit: Desktop)
When executing step 'Make'
Don't know whats wrong and how it will be solved?
Bilal
Offline
Some people have run into this before and they say that the full path to libz needs to be specified, not just "-lz". Also, it would be good to use code tags.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
Hi Connor,
I solved the issue, it seems like the library path was pointing to /usr/local/lib rather than /usr/lib. Now the code is working fine.
I assume that ubuntu and arch places gdcm libraries at different locations, it was working code moved from ubuntu to arch and i got that error.
Bilal
Offline