Hi all,
I’m having some teething problems trying to get the JAP demo to work using MinGw. I’ve managed to compile the project succesfully but unfortunately Live is unable to see the plugin. I’m able to get it to work in MiniHost though, are there any ‘tricks’ I have to know about for Live?
I’ve tried with the given code and a slightly modified version with the dll exports modified to match those of the VST SDK and neither work, here’s the section of the VST wrapper I modified:
[code]extern “C”
{
#ifdef JUCE_MAC
attribute((visibility(“default”))) AEffect* main_macho (audioMasterCallback audioMaster)
{
initialiseJuce_GUI();
#else
__declspec(dllexport) AEffect* VSTPluginMain (audioMasterCallback audioMaster)
{
#endif
MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0);
try
{
if (audioMaster (0, audioMasterVersion, 0, 0, 0, 0) != 0)
{
JuceVSTWrapper* const wrapper = new JuceVSTWrapper (audioMaster,
createPluginFilter());
return wrapper->getAeffect();
}
}
catch (...)
{}
return 0;
}
__declspec(dllexport) AEffect* MAIN (audioMasterCallback audioMaster) asm("main");
AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
}[/code]
And the Makefile I’m using:
# change this to the location of your unpacked VST SDK:
LIBDIR = d:/dev/lib
VSTSDKDIR = $(LIBDIR)/vstsdk2.4
VSTPUBDIR = $(VSTSDKDIR)/public.sdk/source/vst2.x
#WRAPPERDIR = $(LIBDIR)/JuceAudioPlugin/wrapper
WRAPPERDIR = ../../wrapper
PLUGINNAME = juceTest
CPP = g++.exe
#objects
EFF_OBJS = DemoJuceFilter.o DemoEditorComponent.o
WRAPPER_OBJS = $(WRAPPERDIR)/juce_AudioFilterBase.o $(WRAPPERDIR)/juce_AudioFilterEditor.o $(WRAPPERDIR)/formats/VST/juce_VstWrapper.o
VST_OBJS = $(VSTPUBDIR)/audioeffect.o $(VSTPUBDIR)/audioeffectx.o
OBJ = $(EFF_OBJS) $(WRAPPER_OBJS)
#includes
VST_INCS = -I"$(VSTSDKDIR)/pluginterfaces/vst2.x" -I"$(VSTSDKDIR)/public.sdk/source/vst2.x" -I"$(VSTSDKDIR)" -I.
JUCE_INCS = -I"$(LIBDIR)/juce" -I.
CXXINCS = $(VST_INCS) $(JUCE_INCS)
#libs
LIBS = -L. --add-stdcall-alias -lkernel32 -luser32 -mwindows --no-export-all-symbols --def $(PLUGINNAME).def
WIN_LIBS = -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lwininet -ldsound -lshell32 -lvfw32
JUCE_LIBS = -L$(LIBDIR)/juce/bin/ -ljuce
#flags
CXXFLAGS = $(CXXINCS) -DBUILDING_DLL=1 -mwindows
BIN = $(PLUGINNAME).dll
RM = rm -f
.PHONY: all clean
DLLWRAP = dllwrap.exe
DEFFILE = lib$(PLUGINNAME).def
STATICLIB = lib$(PLUGINNAME).a
$(BIN): $(OBJ)
$(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(OBJ) $(LIBS) $(JUCE_LIBS) $(WIN_LIBS) -o $(BIN)
.SUFFIXES: .o .cpp
.cpp.o :
$(CXX) $(CXXFLAGS) -c -o $@ $<
all: $(BIN)
clean:
${RM} $(OBJ) $(BIN)
Can anyone spot any glaring mistakes? :shock:
Also, if anyone has got it working with dev-cpp would it be possible to have a look at the Makefile it produces?
Thanks in advance,
Sam