Author Topic: Howdy! Im a noob :)  (Read 30833 times)

matthewjumpsoffbuildings

  • Guest
Re: Howdy! Im a noob :)
« Reply #30 on: July 24, 2006, 11:17:58 am »
yep it has a gui now

aquila

  • Guest
Re: Howdy! Im a noob :)
« Reply #31 on: September 17, 2006, 06:09:52 pm »
I just finished to make a VST project with C::B and VST 2.4.
It compiles and the DLL has the right exported functions (this was much trouble).
I have only 1 VST host installed in my system: it sees the plugin, read name/channels/... informations correctly, but does not give me the possibility to use it and I don't know why. (May be incompatibilities with 2.4 version???)
If you give me an email, I can send you the project and the DLL, so you can try it and say me if it works for you.

Could you please send that project to me, too? I've been wrestling with C::B, VC++2003 Toolkit and the VST2.4 SDK since yesterday. While I finally got everything to compile okay, the plugins aren't recognized by my VST hosts (most likely a problem with the symbol exports).
And could you make that project available for download? I'm sure it would help a few other people over the initial problems with setting up a VST coding environment.


SDK source files
That files must be added because you can only specify directories for "include" files, generally header ".h" files.
This is to compile, but to have an executable, you need the object files to make the linker work.
To have object files, you must compile the SDK files.
This can be done only including the source files in the project (so they are compiled).
At least this is what I know.

I don't like this, but it is needed, as far as I know.
Anyway VisualStudio projects (bundled in the SDK) include SDK source files in the project too, so I think they are really needed.

If someone knows how to avoid including SDK source files in each project, please let us know!

I think this can be done, but the solution requires some manual work.

The key to the solution: you can pass object files manually to the linker; just add the filename (with complete path, absolute or relative) to the "Build Options"-"Linker/Other linker options" list. This gets treated like just any other argument, and is passed directly to the linker argument list when the linker is called. So you can add any object file to the linking stage without it being part of the current C::B project.

Applying this to VST projects: you need a precompiled .obj file for each of the VST SDK .cpp's you want to use, so that you can pass it to the linker in your other VST projects. I'd recommend setting up a special project which just compiles all the .cpp files in the VST SDK without linking anything.
If you want to build both release and debug versions, create separate object dirs for both variants, one for normal object files, the other compiled with debug settings.

To make a "clean" VST project, add all the required VST SDK object files from our "object-only" project to the linker options and remove each of the corresponding .cpp files from the project. This is important! If you don't remove the .cpp, the linker will compile the file and try to link both the project-internal .obj and the external one, which gives linking errors ("symbol XXX already defined in file XXX").
If you do both release and debug builds, you have to add the appropriate object files to both build targets.

If you compile now, the DLL should be built just as before - all external symbol references are resolved by the object files we are passing directly to the linker.
This results not only in a cleaner project view in the Management pane, but also avoids that the SDK sources are being recompiled each time you do a full rebuild.

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #32 on: October 03, 2006, 03:19:45 am »
Sure I can send you the project!
I'd like also to upload it here, but the last time I tried there was no free space left in the forum for the upload  :(.
I like your ideas about the include of object files, but unfortunately I have very little time now!
I can send you the project and you could try to modify it :). Then let me know if it works!
In the future I'd like to build a template or a wizard to create projects with CodeBlocks + VST (as I tried with Dev-C++), but until CB is stable it does not worthwhile.
Another solution (only graphical, not a full solution as your one) could be to use a new feature of CB: virtual directories (but I have not tried it yet). This is what VC++ does (AFAIK).
You could also mix the 2 ideas: make virtual folders with SDK source files (you may need to read them) and prepare 2 project, one for SDK compile and the other with your VST plug-in (then you need only one additional project for each new plug-in).

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #33 on: October 03, 2006, 03:26:36 am »
Here is the project!

I write here the note I sent by email to matthewjumpsoffbu because you need it to use this project.
This is another problem to be solved!

Quote
I created a little project based on the 'adelay' sample. Then I noticed that in the 'adelay' dir, there are 2 projects: 'adelay' and 'surrounddelay'.
The first is without GUI, while the second has a GUI, so I opted for the second one.
My VST SDK is in C:\VST\vstsdk2.4 and you must adapt the project file 'VST.cbp' to you dir (another way is to install your SDK in the same dir as mine).
To adapt the project, modify it with a text editor before opening it with C::B!
line 33 (internal variable, used for headers and def file):
                <Variable name="VST_SDK_PATH" value="C:\VST\vstsdk2.4" />
line 53, 58, 63, 68, 73, 78:
        <Unit filename="C:\VST\vstsdk2.4\public.sdk\source\vst2.x\[...].cpp">

In order to have a working GUI in your plug-ins, you need to modify the VST source files (I think it is a little incompatibility between MS VC++ compiler and MinGW). For the modify, see my previous post (always in this thread): http://forums.codeblocks.org/index.php?topic=3541.msg28706#msg28706

Another thing: I compiled VST also with Dev-C++ and I made a VST plug-in with GUI using the Trolltech toolkit Qt instead of the GUI libraries bundled with the VST SDK.
If you need info about any of the two, let me know.

[attachment deleted by admin]
« Last Edit: November 17, 2006, 04:50:18 pm by iw2nhl »