VC 7 compiler errors


#1

Hello Jules,

I’m trying to compile the tip and I’m getting the following errors:

juce_String.cpp(406) : error C2065: "_TRUNCATE": identificatore non dichiarato juce_String.cpp(406) : error C3861: "_snwprintf_s": identificatore non trovato nemmeno con una ricerca dipendente dall'argomento
Translation: “_TRUNCATE”: identifier not declared.

juce_ScrollBar.cpp(202) : error C2664: "void juce::ListenerList<ListenerClass>::call<juce::ScrollBar*,juce::ScrollBar*const ,double,ValueType>(void (__thiscall juce::ScrollBarListener::* )(P1,P2),Q1 & ,Q2 &)": impossibile convertire il parametro 3 da "double" a "double &" with [ ListenerClass=juce::ScrollBarListener, ValueType=double, P1=juce::ScrollBar *, P2=double, Q1=juce::ScrollBar *const , Q2=double ] Impossibile associare un riferimento non "const" a un elemento non lvalue
Translation: cannot convert parameter 3 from “double” to “double &”.


#2

Ok… I don’t actually have VC7 to test, but do these changes sort it out?

#if JUCE_WIN32 #if _MSC_VER <= 1400 len = _snwprintf (buffer, numChars, L"%.9g", n); #else

void ScrollBar::handleAsyncUpdate() { double start = visibleRange.getStart(); // (need to use a temp variable for VC7 compatibility) listeners.call (&ScrollBarListener::scrollBarMoved, this, start);


#3

Thank you very much, it works!
There are just a couple of minor warnings left, concerning missing copy and assignment operators:

[code]juce_MouseInputSource.cpp(472) : warning C4511: “juce::MouseInputSourceInternal”: impossibile generare un costruttore di copia
\Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\mouse\juce_MouseInputSource.cpp(39): vedere la dichiarazione di “juce::MouseInputSourceInternal”

juce_MouseInputSource.cpp(472) : warning C4512: “juce::MouseInputSourceInternal”: impossibile generare un operatore di assegnazione
\Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\mouse\juce_MouseInputSource.cpp(39): vedere la dichiarazione di “juce::MouseInputSourceInternal”
[/code]


#4

Ok, thanks, those are easy enough to sort out.


#5

I’ve just updated my checkout and there’s a new problem:

juce_ResizableBorderComponent.cpp(48) : error C2143: errore di sintassi: ";" mancante prima di "juce::ResizableBorderComponent::Zone::fromPositionOnBorder" \Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\layout\juce_ResizableBorderComponent.cpp(48) : error C2761: "__ctor": ridichiarazione della funzione membro non consentita \Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\layout\juce_ResizableBorderComponent.cpp(51) : error C2556: "int juce::ResizableBorderComponent::Zone::fromPositionOnBorder(const juce::Rectangle<ValueType> &,const juce::BorderSize &,const juce::Point<ValueType> &)": la funzione in overload differisce da "const juce::ResizableBorderComponent::Zone juce::ResizableBorderComponent::Zone::fromPositionOnBorder(const juce::Rectangle<ValueType> &,const juce::BorderSize &,const juce::Point<ValueType> &)" solo per il tipo restituito c:\Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\layout\juce_ResizableBorderComponent.h(120): vedere la dichiarazione di "juce::ResizableBorderComponent::Zone::fromPositionOnBorder" \Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\layout\juce_ResizableBorderComponent.cpp(51) : error C2373: "juce::ResizableBorderComponent::Zone::fromPositionOnBorder": ridefinizione. Modificatori di tipo differenti c:\Documents and Settings\superuser\Documenti\DEV\MIDI\dev\MidiApps\COMMON\JUCE\src\gui\components\layout\juce_ResizableBorderComponent.h(120): vedere la dichiarazione di "juce::ResizableBorderComponent::Zone::fromPositionOnBorder"


#6

Thanks, I’ve fixed that now… It’s bizarre that GCC actually let me compile the code without any errors, as what I actually wrote there was gibberish!