Already Defined (NOT MFC/CRT)

A bunch of Audioeffect and Audioeffectx functions are coming up as already defined when linking juce_VstWrapper.obj :expressionless:

I tried the obvious - making sure the files weren't included twice, switching RTTL types (that made it worse).

Unfortunately any info I can find on this error is always about what order MFC and CRT are included in.

Strange. You’ve not got audioeffectx.cpp in your project, have you? The steinberg cpp files are included directly inside the juce VST wrapper cpp file, so you only need to add the juce files to your project, not the steinberg ones.

Oops, thought that whole thing about not including proprietary code applied to this. I’ll gladly delete them.

  • [color=red]click[/color] -

Now it’s just down to one function, _main. But who needs main anyway?

main() is used to launch the plugin, but it’s all handled internally by the juce wrapper code. Make sure you’ve not written your own main routine or built the plugin as an exe.

No it wasn’t my own main or built as an exe.

The 2 mains I found were in juce.h and juce_VstWrapper.cpp, obviously legit since other users aren’t epidemically stuck at the same spot - do I compile 'em separately (currently juceVstWrapper.cpp is part of my plugin project)?

the one in juce.h is a macro - as long as you’ve not used START_JUCE_APPLICATION anywhere, then it’s not going to cause trouble. The one in juce_VSTWrapper is the correct one, so leave that in your project.

Okay I had used the macro. The name was just too tempting (seriously though the descriptive names help a TON).

I think I only have one error left (on the Juce end of things!)

I #included my Jucer GUI header file, but the GUI’s cpp file also includes that same header. The redundancy check changes when I edit the file in Jucer - JUCER_HEADER_MRGUI_, so I can’t use it in my files.

I tried ‘#pragma once,’ no such luck, and didn’t see a space for a #endif for my own redundancy guard.

Also just for kicks I tried #including just the cpp file, thinking it might include the .h file (once) and be hypothetically kopasetic. The compiler’s still mad at me for that one.

Sorry, not sure I understand what you mean. Why would you need your own redundancy guard?

I’m not sure either - it was just a guess.

Basically it’s telling me that my Jucer classes are already defined, though all I did was #include “M2RGUI.h” once, which then includes its subcomponents automatically (I didn’t re-include those).

When I declare a pointer to an M2RGUI object (even the automatic declarations within M2RGUI of pointers to its subcomponents), I’m getting errors that indicate the files are being included twice (missing ‘;’ before ‘*’ and 2 missing type specifiers).

Well all the jucer files will have header guards on them, so can be included any number of times. Must be some other simple mistake, but I can’t tell what from your description…

Sorry about the newbisms; kinda frustrating to know exactly what I want my plugin to do and only be limited by my programming chops.

It compiles now, and the debugger’s having some fun.

Thanks, Jules and Haydxn (I hope I’m pronouncing that right!)