Jucequake - 64 bit Windows broken


#1

Hi,
I updated to the new modules style structure and encountered some problems with 64 bit Windows builds:
I get compile errors in the juce_ZipFile.cpp.
32 bit compiles fine but for 64 bit builds I get the following errors.
(I’m trying to translate the VS 2010 messages from German to English, so maybe this is not the exact error message that others will get)

..\juce\modules\juce_core\zip/juce_ZipFile.cpp(91): error C2780: 'Type juce::jmin(const Type,const Type,const Type,const Type)': Expecting 4 Arguments - 2 supported
..\juce\modules\juce_core\system\../maths/juce_MathsFunctions.h(119): See Declaration of 'juce::jmin'
..\juce\modules\juce_core\zip/juce_ZipFile.cpp(91): error C2780: 'Type juce::jmin(const Type,const Type,const Type)': Expecting 3 Arguments - 2 supported
..\juce\modules\juce_core\system\../maths/juce_MathsFunctions.h(115): See Declaration of 'juce::jmin'
..\juce\modules\juce_core\zip/juce_ZipFile.cpp(91): error C2782: "Type juce::jmin(const Type,const Type)": template-Parameter "Type" is ambiguous.
..\juce\modules\juce_core\system\../maths/juce_MathsFunctions.h(111): See Declaration of 'juce::jmin'
may be 'size_t'
or "juce::int64"
..\juce\modules\juce_core\zip/juce_ZipFile.cpp(116): warning C4018: '>=': Conflict between 'signed' and 'unsigned'

I also get some warnings about libFLAC files even though I set:

These are the warnings:

..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/bitwriter.c(67): warning C4005: 'SWAP_BE_WORD_TO_HOST': Macro-Redefinition
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/bitreader.c(67): See previous definition of 'SWAP_BE_WORD_TO_HOST'
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/format.c(589): warning C4334: "<<": The result of the 32-Bit-Shift was implicitly converted to 64 Bits. (Did you intend to do a 64-Bit-Shift?)
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/format.c(591): warning C4334: "<<": The result of the 32-Bit-Shift was implicitly converted to 64 Bits. (Did you intend to do a 64-Bit-Shift?)
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/format.c(593): warning C4334: "<<": The result of the 32-Bit-Shift was implicitly converted to 64 Bits. (Did you intend to do a 64-Bit-Shift?)
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/stream_encoder.c(3753): warning C4334: "<<": The result of the 32-Bit-Shift was implicitly converted to 64 Bits. (Did you intend to do a 64-Bit-Shift?)
..\juce\modules\juce_audio_formats\codecs\flac/libFLAC/stream_encoder.c(3755): warning C4334: "<<": The result of the 32-Bit-Shift was implicitly converted to 64 Bits. (Did you intend to do a 64-Bit-Shift?)

BTW: I really like the way things are structured right now, but maybe it would be a good idea to include the module wrappers that are generated by the Introjucer into the juce tree, so that you do not need to generate the same files over and over again and store them for each project?


#2

Thanks - the errors are pretty trivial, it just needs an extra cast to int64. Strange that all other compilers can handle it apart from the 64-bit MSVC one. I’ll get that sorted out and checked in today.

I’ll add something to disable those warning flags in the FLAC compilation, but if you’re seeing them then you’re definitely not setting JUCE_USE_FLAC! Or maybe just not in the right place? It’d have to be done in you AppConfig.h file to make sure it gets picked up when compiling the module.

No, it has to be done like that so it can handle the situation where some of your modules are embedded in your project and others are in an external folder. Anyway, the idea is that the introjucer handles all the stuff in that folder, so you don’t need to care what’s in there.