The problem that I've been having doesn't have to do with configuration. Here's the issue: in my codebase, the project's properties show warnings as errors. Because of this, I was forced to make several minor modifications to MAD, such as castings to resolve the possible loss of data and signed/unsigned mismatches (see list below). I just returned to a fresh version of MAD and recompiled without the "Warnings as errors" checkbox being set, and it's now running fine. Unfortunately, I don't think I'm going to be able to convince my teammates to turn that checkbox off for the rest of the codebase. Has anybody else tried compiling libmad using strict compiler settings?
Following is the list of warnings that results if you attempt to compile libmad using strict settings. I didn't include my list of changes for fear of making this note a mile long, but if anybody wants to see them I'll be happy to post them.
frame.c(222) : error C2220: warning treated as error - no object file generated frame.c(222) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data frame.c(315) : warning C4018: '<' : signed/unsigned mismatch frame.c(399) : warning C4018: '>' : signed/unsigned mismatch
layer12.c(164) : error C2220: warning treated as error - no object file generated layer12.c(164) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(375) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(382) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(390) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(413) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(423) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer12.c(428) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(527) : error C2220: warning treated as error - no object file generated layer3.c(527) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(536) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data layer3.c(537) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data layer3.c(538) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data layer3.c(539) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data layer3.c(550) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(567) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(574) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(580) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(582) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(583) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(648) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(732) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(736) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(749) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(758) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(767) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(776) : warning C4244: '=' : conversion from 'unsigned long ' to 'unsigned char ', possible loss of data layer3.c(1056) : warning C4018: '<' : signed/unsigned mismatch layer3.c(1091) : warning C4018: '<' : signed/unsigned mismatch
synth.c(599) : error C2220: warning treated as error - no object file generated synth.c(599) : warning C4146: unary minus operator applied to unsigned type, result still unsigned synth.c(630) : warning C4146: unary minus operator applied to unsigned type, result still unsigned synth.c(736) : warning C4146: unary minus operator applied to unsigned type, result still unsigned synth.c(768) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
All best,
Chris Dellario