computationalpathologygroup / ASAP

Program for the analysis and visualization of whole-slide images in digital pathology
https://computationalpathologygroup.github.io/ASAP/
GNU General Public License v2.0
603 stars 162 forks source link

Error linking JPEG2000Codec #266

Open gitexa opened 4 months ago

gitexa commented 4 months ago

[resolved| -> to be deleted

sv111x commented 1 month ago

How did you fix the linking errors?

[  6%] Linking CXX shared library libjpeg2kcodec.so
/usr/bin/ld: CMakeFiles/jpeg2kcodec.dir/JPEG2000Codec.cpp.o: in function `opj_stream_create_default_memory_stream(opj_memory_stream*, int)':
JPEG2000Codec.cpp:(.text+0x13c): undefined reference to `opj_stream_default_create'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x157): undefined reference to `opj_stream_set_write_function'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x166): undefined reference to `opj_stream_set_seek_function'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x175): undefined reference to `opj_stream_set_skip_function'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x187): undefined reference to `opj_stream_set_user_data'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x194): undefined reference to `opj_stream_set_user_data_length'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x1ab): undefined reference to `opj_stream_set_read_function'
/usr/bin/ld: CMakeFiles/jpeg2kcodec.dir/JPEG2000Codec.cpp.o: in function `JPEG2000Codec::decode(unsigned char*, unsigned int const&, unsigned int const&)':
JPEG2000Codec.cpp:(.text+0x245): undefined reference to `opj_set_default_decoder_parameters'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x24c): undefined reference to `opj_create_decompress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x260): undefined reference to `opj_set_info_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x271): undefined reference to `opj_set_warning_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x282): undefined reference to `opj_set_error_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x28d): undefined reference to `opj_setup_decoder'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x29a): undefined reference to `opj_codec_set_threads'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x2aa): undefined reference to `opj_read_header'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x2d5): undefined reference to `opj_set_decode_area'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x2e5): undefined reference to `opj_decode'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x2f0): undefined reference to `opj_end_decompress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x2f8): undefined reference to `opj_stream_destroy'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x300): undefined reference to `opj_destroy_codec'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x3dd): undefined reference to `opj_image_destroy'
/usr/bin/ld: CMakeFiles/jpeg2kcodec.dir/JPEG2000Codec.cpp.o: in function `JPEG2000Codec::decode(unsigned char*, unsigned int const&, unsigned char*, unsigned int const&)':
JPEG2000Codec.cpp:(.text+0x4ac): undefined reference to `opj_set_default_decoder_parameters'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x4b3): undefined reference to `opj_create_decompress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x4c7): undefined reference to `opj_set_info_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x4d8): undefined reference to `opj_set_warning_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x4e9): undefined reference to `opj_set_error_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x4f4): undefined reference to `opj_setup_decoder'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x501): undefined reference to `opj_codec_set_threads'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x511): undefined reference to `opj_read_header'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x521): undefined reference to `opj_decode'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x52c): undefined reference to `opj_end_decompress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x534): undefined reference to `opj_stream_destroy'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x53c): undefined reference to `opj_destroy_codec'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x5fd): undefined reference to `opj_image_destroy'
/usr/bin/ld: CMakeFiles/jpeg2kcodec.dir/JPEG2000Codec.cpp.o: in function `JPEG2000Codec::encode(char*, unsigned int&, unsigned int const&, unsigned int const&, unsigned int const&, pathology::DataType const&, pathology::ColorType const&) const':
JPEG2000Codec.cpp:(.text+0x6f4): undefined reference to `opj_set_default_encoder_parameters'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x8c4): undefined reference to `opj_create_compress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x8e1): undefined reference to `opj_set_info_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x8f2): undefined reference to `opj_set_warning_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x903): undefined reference to `opj_set_error_handler'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x930): undefined reference to `opj_image_create'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0x976): undefined reference to `opj_setup_encoder'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xa8c): undefined reference to `opj_start_compress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xa97): undefined reference to `opj_encode'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xaa2): undefined reference to `opj_end_compress'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xaaa): undefined reference to `opj_stream_destroy'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xab2): undefined reference to `opj_image_destroy'
/usr/bin/ld: JPEG2000Codec.cpp:(.text+0xaba): undefined reference to `opj_destroy_codec'
/usr/bin/ld: libjpeg2kcodec.so: hidden symbol `opj_read_header' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status