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

Error linking JPEG2000Codec #266

Open
gitexa opened this issue Mar 15, 2024 · 4 comments
Open

Error linking JPEG2000Codec #266

gitexa opened this issue Mar 15, 2024 · 4 comments

Comments

@gitexa
Copy link

gitexa commented Mar 15, 2024

[resolved| -> to be deleted

@gitexa gitexa changed the title JPEG2000Codec Building from source, error linking JPEG2000Codec Mar 15, 2024
@gitexa gitexa changed the title Building from source, error linking JPEG2000Codec Error linking JPEG2000Codec Mar 15, 2024
@sv111x
Copy link

sv111x commented Jun 1, 2024

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

@qianxihaoyue
Copy link

i have the same problem

@qianxihaoyue
Copy link

how do you solve it

@qianxihaoyue
Copy link

👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:256: undefined reference to opj_destroy_codec' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:276: undefined reference to opj_image_destroy'
👎 error: multiresolutionimageinterface/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': /usr/bin/ld: multiresolutionimageinterface/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':
/home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:296: undefined reference to opj_set_default_encoder_parameters' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:329: undefined reference to opj_create_compress'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:332: undefined reference to opj_set_info_handler' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:333: undefined reference to opj_set_warning_handler'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:334: undefined reference to opj_set_error_handler' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:343: undefined reference to opj_image_create'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:352: undefined reference to opj_setup_encoder' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:378: undefined reference to opj_start_compress'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:379: undefined reference to opj_encode' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:380: undefined reference to opj_end_compress'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:383: undefined reference to opj_stream_destroy' :-1: error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:384: undefined reference to opj_image_destroy'
👎 error: /home/hty/ccode/ASAP (1)/ASAP-2.2/multiresolutionimageinterface/JPEG2000Codec.cpp:385: undefined reference to opj_destroy_codec' :-1: error: multiresolutionimageinterface/libjpeg2kcodec_d.so: hidden symbol opj_read_header' isn't defined
👎 error: final link failed: bad value
👎 error: collect2: error: ld returned 1 exit status
👎 error: ninja: build stopped: subcommand failed.

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

3 participants