Detailed steps on how to reproduce the bug
In a project using its own version of LibJpeg with the code of jdhuff.c, there is a link error even if JUCE_INCLUDE_JPEGLIB_CODE = 0
In juce_graphics_libjpg_1.c, the JUCE_INCLUDE_JPEGLIB_CODE flag does not cover all the code.
The last lines are always included :
#define savable_state dedup_savable_state
#define huff_entropy_ptr dedup_huff_entryopy_ptr
#define finish_pass_huff dedup_finish_pass_huff
#include "juce_graphics/image_formats/jpglib/jdhuff.c"
#undef savable_state
#undef huff_entropy_ptr
#undef finish_pass_huff
What is the expected behaviour?
JUCE_INCLUDE_JPEGLIB_CODE = 0 should prevent the link error
Operating systems
Windows
What versions of the operating systems?
Windows 11
Architectures
x86 (Windows, Android)
Stacktrace
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
Detailed steps on how to reproduce the bug
In a project using its own version of LibJpeg with the code of jdhuff.c, there is a link error even if JUCE_INCLUDE_JPEGLIB_CODE = 0
In juce_graphics_libjpg_1.c, the JUCE_INCLUDE_JPEGLIB_CODE flag does not cover all the code.
The last lines are always included :
#define savable_state dedup_savable_state
#define huff_entropy_ptr dedup_huff_entryopy_ptr
#define finish_pass_huff dedup_finish_pass_huff
#include "juce_graphics/image_formats/jpglib/jdhuff.c"
#undef savable_state
#undef huff_entropy_ptr
#undef finish_pass_huff
What is the expected behaviour?
JUCE_INCLUDE_JPEGLIB_CODE = 0 should prevent the link error
Operating systems
Windows
What versions of the operating systems?
Windows 11
Architectures
x86 (Windows, Android)
Stacktrace
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
developbranchThe bug is present on the
developbranchCode of Conduct