Attached is a windows 32bit version of your plugin.
I had to change the variable deceleration on line 89 to a regular "int" to get it to compile. No other changes were made.
I see you already changed the identifier stuff in the main cpp file. To make multiple plugins in one bundle/dll you just need to define multiples like this:
- Code: Select all
DLLExport unsigned long getNumBidules() {
return 2;
}
DLLExport ErrorCode fillBiduleInfo(unsigned long biduleIdx, BidulePluginInfo* biduleInfo) {
//return NO_PLUGIN if no plugin for that idx
//return NO_ERROR for OK
//shouldn't happen but there's nothing
//wrong with some error handling mechanisms
switch(biduleIdx) {
case 0:
strcpy(biduleInfo->type, "com.surroundbyus.Zmeter1_1");
strcpy(biduleInfo->name, "Zmeter1.1");
strcpy(biduleInfo->fullName, "Z\tZmeter 1.1");
return BSDK_NO_ERROR;
break;
case 1:
strcpy(biduleInfo->type, "com.surroundbyus.ZAG2_2");
strcpy(biduleInfo->name, "ZAutomaticGain2.2");
strcpy(biduleInfo->fullName, "Z\tZAG 2.2");
return BSDK_NO_ERROR;
break;
default:
return BSDK_NO_PLUGIN;
break;
}
}
DLLExport BidulePluginStruct* newInstance(const char* type, BiduleHost* host) {
int x = 0;
if( strcmp(type, "com.surroundbyus.Zmeter1_1") == 0) {
BidulePlugin* bp = new Zmeter1_1(host);
x = 1;
return bp->getBidulePluginStruct();
}
if( strcmp(type, "com.surroundbyus.ZAG2_2") == 0) {
BidulePlugin* bp = new ZAG2_2(host);
x = 1;
return bp->getBidulePluginStruct();
}
if ( x == 1)
return NULL;
}
I make a copy of SDKExampleMain.cpp for each plugin, but I have all the include stuff in one .h file, in separate sections. So the above project I have
Zag 2.2.cpp (the "main")
Zag.cpp (a plugin)
Zmeter.cpp (a plugin)
and Zag 2.2.h
cheers