vc6 build error


#1
void VSTPluginInstance::restoreFromTempParameterStore (const MemoryBlock& m)
{
    changeProgramName (getCurrentProgram(), (const char*) m);

    float* p = (float*) (((char*) m.getData()) + 64);
    for (int i = 0; i < getNumParameters(); ++i)
        setParameter (i, p[i]);
}

in VC6 i need the MemoryBlock method getData for this (const char *) cast to work

void VSTPluginInstance::restoreFromTempParameterStore (const MemoryBlock& m)
{
    changeProgramName (getCurrentProgram(), (const char*) m.getData());

    float* p = (float*) (((char*) m.getData()) + 64);
    for (int i = 0; i < getNumParameters(); ++i)
        setParameter (i, p[i]);
}

otherwise JUCE build failes.

also in the AudioProcessorGraph in the processBlock() method the compiler complains about the “i” variable beeing defined inside a ‘case’ statement so i just defined the “i” value in the beginning of the method and removed the decalration from the case and left just the assignments (it builds ok).

There are some file missing in the JUCE.dsp and the library will be incomplete, http://relay.sndlab.com/filestore/x/JUCE.dsp here is a working one with all files in the project.

edit:

i also noticed that the VST wrapper code causes the built plugins to cause errors in hosts, i use FLStudio 8 and the method that causes errors is the getStateInformation and setStateInformation, the host says there was an error saving or restroing settings, i built the same code with VC8 and no problems occur. i think i’ll drop trying to work with VC6 it’s becoming too much of a problem.


#2

Thanks - I only ever run vc6 now when I’m updating the juce project to keep it up to date, and haven’t done that for a while. Recently it does seem that people are finally giving it up as defunct.


#3

BTW I’ve just had a go and checked in a few changes that should sort this stuff out. Let me know if I’ve missed anything.


#4

yeah it works perfectly and my kitty decimator builds nicely (http://svn.sndlab.com/kitty for the source).

thanks.