Just saying hi - im a total noob to C++ and have been reading tons of tutorials - im starting to understand the basics i think.
anyway codeblocks is great! i downloaded the stable version, and followed the instructions on the wiki to set up MinGW - and have been compiling console apps to my hearts content.
So now i have a few questions :)
(1 - Am i better off getting the latest builds? It seems like the stable version is very old....
(2 - Are the versions of GCC files that the wiki instructions pointed to recent enough? should i get later versions of gcc, g++, mingw stuff?
(3 - I want to set up wxWidgets 2.6.3 - i believe thats possible from briefly browsing this forum? Am i right?
(4 - I want to make VST plugins. I dled the VST SDK - now i want to try to compile one of the example projects. I have no idea where to put the sdk, and how to set up the standard "dll" project template into a new user template that makes vsts - one that finds the right files when i try and compile. Anyone able to help me with where to put files/what files to put in the vsts project directory etc? Especially people who have experience making VSTs in Code:Blocks.
Cheers. And thanks so much for Code:Blocks it rocks.... :D
3) Yes, you must download the sources AND the patch 2 from http://wxWidgets.org. Don't forget the patch or you'll have troubles.What do you mean? What patch has to be applied?
(4 - I want to make VST plugins.I used VST plugins with Dev-Cpp, may be I can help you if you describe your problem!
Patch 2 @ http://wxwidgets.org/downloads/patch.htmPerfect! Thank you!
A question:
the patch-2 contains the patch-1, so it must be applied to the base 'wxMSW-2.6.3' or can be applied to the already patched (with patch-1) 'wxMSW-2.6.3-1' too?
[EDIT]
The patch ZIP is not a 'diff' file, but contains the already-patched source files.
No 'patch' executable is needed, just overwrite the files in the source dir!
GCC 3.4.2 manual install
Installing MinGW can be quite intimidating the first time because it is not obvious what you have to do. Luckily, it is actually pretty simple.
To do a manual install, simply download the required files and extract them all into the same directory. For simplicity, I recommend C:\MinGW.
Base system with C++
* http://prdownloads.sourceforge.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download
* http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz?download
* http://prdownloads.sf.net/mingw/w32api-3.5.tar.gz?download
* http://prdownloads.sf.net/mingw/binutils-2.16.91-20050827-1.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/mingw32-make-3.80.0-3.tar.gz?download
Optionally:
gdb debugger
* http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
OK thanks guys - i will have to look into getting the latest build and gcc 4.0 and wxwidgets....
oh btw - what version packages should i get instead of the ones in the wiki? Whats the latest versions that are still stable? i used these versionsQuoteGCC 3.4.2 manual install
Installing MinGW can be quite intimidating the first time because it is not obvious what you have to do. Luckily, it is actually pretty simple.
To do a manual install, simply download the required files and extract them all into the same directory. For simplicity, I recommend C:\MinGW.
Base system with C++
* http://prdownloads.sourceforge.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz?download
* http://prdownloads.sf.net/mingw/mingw-runtime-3.9.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz?download
* http://prdownloads.sf.net/mingw/w32api-3.5.tar.gz?download
* http://prdownloads.sf.net/mingw/binutils-2.16.91-20050827-1.tar.gz?download
* http://prdownloads.sourceforge.net/mingw/mingw32-make-3.80.0-3.tar.gz?download
Optionally:
gdb debugger
* http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
Another question:
I applied the patch and recompiled, but the resulting DLL has not been rebuilt, is this right?
DLL: wxWidgets\lib\gcc_dll\wxmsw26u_gcc_custom.dll
I tried also to give the "clean" command and then rebuild everything, but still the DLL did not change. Moreover I noticed that the 'clean' command did not remove the old DLL.
Is this a bug of the wxWidgets makefile or is this right?
[EDIT]
I noticed that there are 2 DLLs:
1) wxmsw26u_gcc_custom.dll
2) wxmsw26_gcc_custom.dll
The wiki says I need the first one (which has not been modified), while the second one has been modified (really I didn't notice it before!).
What's the difference between the 2 DLLs?
edit: oh sorry i missed ur post iw2nhl - my 'problem' is i dont know what to do :) I put the vstsdk2.4 folder in C:/ and then i copied the sample project "adelay" over into a folder that i use to store my codeblocks proejects. then i made a new dll project in codeblocks and added all the cpp and h files in the folder to it...i believe thats a way to do it? when i went to compile i tried adding the vstsdk dir to the directories settings - maybe i need to add specific folders? currently i cant compile it - i keep getting lots of errors.Hi,
VST_SDK_PATH = C:\vstsdk2.3
VST_SDK_COMMON = $${VST_SDK_PATH}\source\common
SOURCES += \
$${VST_SDK_COMMON}\AudioEffect.cpp \
$${VST_SDK_COMMON}\audioeffectx.cpp \
$${VST_SDK_COMMON}\aeffguieditor.cpp \
$${VST_SDK_COMMON}\vstgui.cpp \
$${VST_SDK_COMMON}\vstcontrols.cpp
RC_FILE += resource\ADelayEditGUI.rc
DEF_FILE += ADelayEditGUI.def
LIBS += -luuid -lole32 -lgdi32 -lcomdlg32 -lvfw32
Modify vstgui.cpp file as follows:
- in function 'checkResolveLink', cast 'wsz' using '(WCHAR *)' in line 7338 and line 7340
Modify the VSTnameEditMain.cpp file as follows:
- '#if BEOS'… becomes '#if __GNUC__ && (WIN32 || BEOS)'
- add 'asm("main")' to the end of the *main_plugin(…) definition line
- add 'extern "C"' to the beginning of the DllMain(…) definition (to get GUI to work)
VST_SDK_PATH = C:\vstsdk2.3
VST_SDK_COMMON = $${VST_SDK_PATH}\source\common
SOURCES += \
$${VST_SDK_COMMON}\AudioEffect.cpp \
$${VST_SDK_COMMON}\audioeffectx.cpp \
$${VST_SDK_COMMON}\aeffguieditor.cpp \
$${VST_SDK_COMMON}\vstgui.cpp \
$${VST_SDK_COMMON}\vstcontrols.cpp
RC_FILE += resource\ADelayEditGUI.rc
DEF_FILE += ADelayEditGUI.def
LIBS += -luuid -lole32 -lgdi32 -lcomdlg32 -lvfw32
.....
I noticed that there are 2 DLLs:
1) wxmsw26u_gcc_custom.dll
2) wxmsw26_gcc_custom.dll
The wiki says I need the first one (which has not been modified), while the second one has been modified (really I didn't notice it before!).
What's the difference between the 2 DLLs?
Umm I dont have a "common" folder :( I am using VST SDK v 2.4 not 2.3 like you.
so what should i do? and how/where do i enter all that stuff into C++ once ive changed it to point to the right place?CodeVST_SDK_PATH = C:\vstsdk2.3
VST_SDK_COMMON = $${VST_SDK_PATH}\source\common
SOURCES += \
$${VST_SDK_COMMON}\AudioEffect.cpp \
$${VST_SDK_COMMON}\audioeffectx.cpp \
$${VST_SDK_COMMON}\aeffguieditor.cpp \
$${VST_SDK_COMMON}\vstgui.cpp \
$${VST_SDK_COMMON}\vstcontrols.cpp
RC_FILE += resource\ADelayEditGUI.rc
DEF_FILE += ADelayEditGUI.def
LIBS += -luuid -lole32 -lgdi32 -lcomdlg32 -lvfw32
thanks :)
BTW, if the first one don't get modified compiling wxWidgets, you're doing that in Ansi mode.You are right! I made a little mistake: I copied the wrong line to compile wxWidgets
Read the wiki for the compilation in unicode mode.
1) VST 2.4 has changed completely the directory structure and I never used it, so I cannot help you with it.
If I'll find some time, I'll try to adapt the how-to to the new version.
Try to find the same files in 2.4 or use 2.3.
extern "C"
VST_EXPORT AEffect* main_macho (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
VST_EXPORT AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
extern "C" VST_EXPORT AEffect* main_macho (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
extern "C" VST_EXPORT AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
extern "C" BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
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.
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 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">