pnglibNamespace[fixed]


#1

I decided to upgrade my projects to 1.46 today (SVN). Building the libs fails like so:

Compiling...
juce_PNGLoader.cpp
c:\Program Files\Microsoft Platform SDK\Include\crt\malloc.h(146) : error C2883: 'pnglibNamespace::free' : function declaration conflicts with 'free' introduced by using-declaration
        c:\Program Files\Microsoft Platform SDK\Include\crt\stdlib.h(270) : see declaration of 'free'
c:\Program Files\Microsoft Platform SDK\Include\crt\malloc.h(147) : error C2883: 'pnglibNamespace::malloc' : function declaration conflicts with 'malloc' introduced by using-declaration
        c:\Program Files\Microsoft Platform SDK\Include\crt\stdlib.h(283) : see declaration of 'malloc'
juce_JPEGLoader.cpp
juce_GIFLoader.cpp
Generating Code...

edit: I have tried moving the crt include up and down the list…


#2

Well, commenting out line 50 and 51 in the PNGLoader file seems to fix it. One of my apps loads PNGs successfully, so I guess that’s all there was to it.


#3

Doing that might break other builds though - what platform are you building on?


#4

VC 2003.


#5

Ok, well I’ll have to try all the different builds to find out which one these lines were required for. It could be that they’re not actually needed.