How to compile VST SDK plug-ins with DevC++

This method is tested with DevC++ version 4.9.8.0 and VST plug-in SDK version 2.4

  1. new DLL project, C++
  2. remove automatically generated .cpp and .hpp files
  3. add VST SDK "common" files to project
  4. add plugin source files to project
  5. add line
    static AudioEffect *effect = 0;
    to the file VSTnameMain.cpp before the bool-line, if it is not there
  6. change the line static AudioEffect *effect = 0;
    to effect = new VSTname (audioMaster);
    in the AEffect* main() function (VSTnameMain.cpp)
  7. change the line #if BEOS
    to #if __GNUC__&&(WIN32||BEOS)
    in file VSTnameMain.cpp
  8. if file VSTname.def exists, change the line EXPORTS main
    to EXPORTS main=main_plugin
  9. if VSTname.def does not exist, create it (text file containing the line above)
  10. Project -> Project Options -> Directories -> Include Directories, add the SDK "common" directory
  11. Project -> Project Options -> Parameters -> Linker, add the .def file to linker options, i.e. add
  12. you may need to remove references to OFN_ENABLESIZING in the file vstgui.cpp, if you use the original vstgui, i.e. not the sourceforge version. lines 5833 and 5969 and cast wsz to (WCHAR*) on lines 7338 and 7340
  13. compile and hope for the best
  14. you'll get lots of #pragma warnings and a warning about multicharacter character constant, they are ok

Valid HTML 4.01 Transitional paulus, 2008/07/06