Dev-cpp and the demo plugin

#ifdef JUCE_MAC
extern "C" __attribute__((visibility("default"))) AEffect* main_macho (audioMasterCallback audioMaster)

__declspec(dllexport) void* main (audioMasterCallback audioMaster)
    MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0);

        if (audioMaster (0, audioMasterVersion, 0, 0, 0, 0) != 0)
            JuceVSTWrapper* const wrapper = new JuceVSTWrapper (audioMaster, 

            return (int)wrapper->getAeffect();
    catch (...)

    return 0;

and an error:

1042 C:\atm\projects\myPlug\wrapper\formats\VST\juce_VstWrapper.cpp `main' must return `int' 

the compiler uses the main declaration cause this is not a MAC, what’s up with that ?(change some defines?)

latest DEV-CPP juce+demo (standalone) compiled clean. VST SDk 2.4 (changed defines to use 2.4 not 2.3).


I’ve never tried doing a VST with dev-cpp. It’s a very dumb compiler error, because main() in this case isn’t even the same function as the main() that it’s talking about! Presumably it’d throw out this error for any function called “main”, regardless of the parameter list.

Not sure how to fix it. Maybe a conditional compile for dev-cpp. Might even have been fixed since the archaic version of gcc that it uses.


i’ll try a newer gcc with it, maybe it will work