I recently found that your mangling of the OpenJPEG is incomplete. There are two OpenJPEG libraries in ITK:
- ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg
- ITK\Modules\ThirdParty\GDCM\src\gdcm\Utilities\gdcmopenjpeg\src\lib\openjp2
The first one is an older version of OpenJPEG and appears mangled correctly. The second one from GDCM does miss a lot of functions to be mangled. We are linking against our own production version of the OpenJPEG and getting the following link errors (below).
Could you please re-mangled this library for the next maintenance release (4.13.2) and ITK 5?
Here is the list of my linking errors:
itkgdcmopenjp2-4.13.lib(image.obj) : error LNK2005: opj_image_create0 already defined ...
itkgdcmopenjp2-4.13.lib(image.obj) : error LNK2005: opj_image_comp_header_update already defined ...
itkgdcmopenjp2-4.13.lib(image.obj) : error LNK2005: opj_copy_image_header already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_bytes_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_bytes_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_bytes_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_bytes_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_double_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_double_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_double_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_double_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_float_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_read_float_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_float_LE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_write_float_BE already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_read_data already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_write_data already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_flush already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_skip already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_tell already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_get_number_byte_left already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_write_skip already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_read_skip already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_read_seek already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_write_seek already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_seek already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_has_seek already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_default_read already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_default_write already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_default_skip already defined ...
itkgdcmopenjp2-4.13.lib(cio.obj) : error LNK2005: opj_stream_default_seek already defined ...