Closed dougyau closed 1 year ago
When bindgen with charls https://github.com/coradoya/charls-sys is used on static compilation mode, and gdcm-rs is used as well, the linker will throw an error due to duplicated symbols.
GDCM includes it's own version of charls (an old version btw). So another posible solution would be to add bindings to the custom gdcm charls implementation, but I think it is better to use the current official version of the library to encode to jpeg-ls.
As both libraries expose the same symbols (so the conflict) once the linker uses the newer version of charls it does compile and it works, as the symbols expected by GDCM are still present on charls current tree (and will be there until 3.x happens).
Thanks for explaining. Makes a lot of sense!
This feature gates the linking of gdcmcharls as it conflicts when trying to link libcharls on the project (this is useful when using libcharls to encode jpeg-ls).