[Dev-C++] How to make VSTpluggs with Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Gabriel L. <ga...@ti...> - 2003-10-02 17:05:16
|
How to make VSTpluggs with Dev-C++ v. 4.9.8.0 [http://bloodshed.net] or later. by Gabriel Lindeborg [gabriel.lindeborg[at]sverige.nu] 2003-10-02 2nd edition Changes since 1st edition: OpenSource VSTGUI! First of all you should get the latest SDK/VSTGUI from Steinberg and read the info and study the examples to get to know it, this document is about how to make the SDK work in Dev-C++, not how to make VSTPluggs in general. Make sure there are no strange characters, no spaces or long folder names (ie more than 8 chars) in your paths, this took hours out from my VST-development time when I had my project in the My Documents folder. It should work I suppose, but it doesn't. Why? Start a new DEV-C++ project. Choose DLL Project. Delete the automaticly created hpp file and cpp file. Add the SDK common files to your project, preferably in a map since "thou shall no edit these files". Add your source files and resource-file. The next step has been done by Steinberg already on some of the SDK examples, but if your VSTnameMain.cpp isn't changed add static AudioEffect *effect =3D 0; before the bool line in the beginning of the VSTnameMain.cpp, if it isn't there already, and change the line *AudioEffect effect =3D new VSTname (audioMaster); into effect =3D new VSTname (audioMaster); I don't know why... it just didn't work unless. For me anyway... Change the line #if BEOS into #if __GNUC__&&(WIN32||BEOS) in your VSTnameMain.cpp file. as well as the line BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved) into #if __GNUWIN32__ extern "C" BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved) #else BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved= ) #endif Change the line EXPORTS main into EXPORTS main=3Dmain_plugin in your VSTname.def file. Open the Project Options Dialog Add the SDK common directory to the include directories in in the directories page. Add -D__GNUWIN32__ -mcpu=3Dpentium -D_M_IX86=3D500 -W -DWIN32 -DNDEBUG -D_WINDOWS to the C compiler options. Add -D__GNUWIN32__ -mcpu=3Dpentium -D_M_IX86=3D500 -W -DWIN32 -DNDEBUG -D_WINDOWS -gstabs the C++ compiler options. Add -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lmsimg32 -lmsvcrt --def VSTname.def to the linker options. Compile! Don't hesitate to give me feedback @ [gabriel.lindeborg[at]sverige.nu]!! Thanks goes to: Friedemann Wolpert Urs Heckmann Colin Laplace Alex Ebersp=E4cher Per Westermark and all the other VST developers who has provided input to and help with this how to... and Steinberg for letting us play with VST and making VSTGUI OpenSource. Note I: Altough this should work with Dev-C++ 4.01, I can't figure out how. The file compiles fine but they do, as it seems, not export main. Anyway neither Cubase nor FruityLoops will recognize the resulting .dll. Any ideas? |