How to use the SDK with Code::Block ?

DSP, Plug-in and Host development discussion.
OfWhat
KVRer
2 posts since 1 Jul, 2009

Post Wed Jul 01, 2009 8:50 am

Hi,

I used to code in C++ some years ago, and I want to jump in the VST programming. But it's been a while, and I have absolutely no idea how I can make Code::Block with MinGW use the headers from the Steinberg SDK. I de-zipped a the four zip files in c:\VST (VSTGui, VSTModuleArchitecture,AsioSDK,vst_sdk), but I can't go further... I would really enjoy some help here !!

Thank you, and sorry for my bad english :roll:

grymmjack
KVRAF
8496 posts since 7 Apr, 2003

Post Mon Jul 06, 2009 6:39 pm

did you setup your CBP with the include paths pointing to the SDK and etc already? need those.

User avatar
Christian Schüler
KVRist
244 posts since 23 Nov, 2004 from Hamburg, Germany

Post Tue Jul 07, 2009 10:43 am

If you're on MinGW, have you had a look at wx-DevC++?

http://wxdsgn.sourceforge.net/

BobSlot
KVRer
8 posts since 10 Jul, 2009

Post Fri Jul 10, 2009 5:41 am

You can also import the sample MS visual c++ project in code::blocks. Just click the file/import project/MS visual c++ project.
That is how I did it.

OfWhat
KVRer
2 posts since 1 Jul, 2009

Post Fri Jul 10, 2009 5:56 am

Thank you everyone !! I didn't have the time to try all this, but thank you for the help !!

grymmjack
KVRAF
8496 posts since 7 Apr, 2003

Post Fri Jul 10, 2009 5:58 am

bobslot; did that work? i use codeblocks for work (linux platform) but win32 i've not tried yet. are you able to convert the project and compile the gain exmaple?

BobSlot
KVRer
8 posts since 10 Jul, 2009

Post Fri Jul 10, 2009 6:59 am

grymmjack wrote:bobslot; did that work? i use codeblocks for work (linux platform) but win32 i've not tried yet. are you able to convert the project and compile the gain exmaple?
Yes. I did it from an tutorial, but I do not remember where it was from.
I also forgot to say that you must change one more settings in code::blocks. After you imported the example project you must add "-def ..\win\vstplug.def" (without the ") in project/build options/linker settings/other linker options. It had something todo with exporting the correct main function so older hosts would see the new VSTPluginMain.

Edit: I use VST 2.4 SDK. In VST 3 it might be different. But I hope it helps someone.

v3ktr0n
KVRer
2 posts since 16 Jan, 2006 from east coast USA

Post Thu Nov 12, 2009 7:08 pm

i had a question ...

i recently downloaded the VST sdk 2.3 & 2.4(R2)
i want to use one of those with some kind of C++ environment preferably with dev C++ 4.992, codeblocks 8.02 or any other freeware environment like that. i seriously want to start building some VST synths because i have a few good ideas that i think might really work. and i noticed you guys havn't posted
any replies or thoughts since july of this year, .... hmmm

User avatar
antto
KVRAF
2502 posts since 4 Sep, 2006 from 127.0.0.1

Post Thu Nov 12, 2009 8:34 pm

BobSlot wrote:
grymmjack wrote:bobslot; did that work? i use codeblocks for work (linux platform) but win32 i've not tried yet. are you able to convert the project and compile the gain exmaple?
Yes. I did it from an tutorial, but I do not remember where it was from.
I also forgot to say that you must change one more settings in code::blocks. After you imported the example project you must add "-def ..\win\vstplug.def" (without the ") in project/build options/linker settings/other linker options. It had something todo with exporting the correct main function so older hosts would see the new VSTPluginMain.
...
yep, i haven't messed with VST SDK, but i had to figure this -def option for a mIRC DLL, which also relies on specific exported functions
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.freenode.net >>> #kvr

bmoviehorror
KVRist
70 posts since 20 Feb, 2009 from Nottingham, UK

Post Sat Nov 21, 2009 11:49 am

Build again in code::blocks . . .

1) Make new EMPTY project and call it "again" - you can save this anywhere on your system

2) Assuming you have put the sdk at c:\vstsdk2.4, then right click on the project you have just created, select build options, got to the 'search directories' tab and add c:\vstsdk2.4 to the list.

3) Right click on the project and select add files. Add the following:
C:\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp
C:\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp
C:\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp
C:\vstsdk2.4\public.sdk\samples\vst2.x\again\source\again.cpp
C:\vstsdk2.4\public.sdk\samples\vst2.x\again\source\again.h

4) Right click on the project, select 'Properties', navigate to the 'Build targets' tab and select 'Dynamic library' from the 'Type' drop down list.

5) Right click the project, select 'Build options' go to the linker settings tab and under 'Other linker options' add the following:
-def C:\vstsdk2.4\public.sdk\samples\vst2.x\win\vstplug.def

6) Build the project.

AntiPro
KVRist
86 posts since 11 May, 2003

Post Mon Dec 07, 2009 7:33 pm

Visual C++ 2008 Express Edition is totally free and allows development of commercial applications. I'd say it's the best IDE/compiler on Windows with distance. The VST SDK examples should build out of the box with it (and if not, it should be easy to get them to build).
Karel Bassez
Software Engineer
Vienna Symphonic Library GmbH

Return to “DSP and Plug-in Development”