We use FreeImage library in our project. As FreeImage has PNG lIbrary, we linked that library to JUCE instead of including the source. But there is a MACRO PNG_SETJMP_NOT_SUPPORTED which is not defined by FreeImage but defined by JUCE. And FreeImage uses some functions which is declared by that MACRO. If we link to that library without that MACRO , JUCE is not writing to file.
png_set_write_fn (); is failing. So we are setting the stream pointer explicitly after the png_set_write_fn (); is called to make it work temporarily.
Can you tell what is that MACRO for and how to resolve this issue without using that MACRO.