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

Offline matthewjumpsoffbuildings

  • Multiple posting newcomer
  • *
  • Posts: 18
Howdy! Im a noob :)
« on: July 13, 2006, 03:34:11 pm »
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

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Howdy! Im a noob :)
« Reply #1 on: July 13, 2006, 05:49:18 pm »
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

1) Latest builds are more feature-rich... much better to get them. In wiki there is an howto (updated yesterday) on getting and compiling latest sources from svn.

2) The GCC are ok... if you want you can get newer ones, but not over the 4.0.x series. The 4.1.x has a problem.

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.

4) I have no idea about  :shock:

Ciao

Max

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #2 on: July 13, 2006, 10:07:34 pm »
Hi,
Quote from: mdelfede
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?
Quote from: matthewjumpsoffbu
(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!

A side note: I compiled a VST plugin also using Qt4 libraries and qmake, but there are troubles with the event loop.
« Last Edit: July 13, 2006, 10:10:19 pm by iw2nhl »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Howdy! Im a noob :)
« Reply #3 on: July 13, 2006, 10:22:48 pm »

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #4 on: July 13, 2006, 10:48:46 pm »
Patch 2 @ http://wxwidgets.org/downloads/patch.htm
Perfect! Thank you!
Now I understand also why there was a wxMSW-2.6.3.zip and a wxMSW-2.6.3-1.zip: the last one contained the Patch-1.
Google found for me a 'patch' executable for windows:
http://gnuwin32.sourceforge.net/packages/patch.htm

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!
« Last Edit: July 13, 2006, 10:52:41 pm by iw2nhl »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: Howdy! Im a noob :)
« Reply #5 on: July 13, 2006, 10:53:40 pm »
patch 2 contains patch 1, so can apply it wx263, and if you like also to wx263p1. The end result will be the same .

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Howdy! Im a noob :)
« Reply #6 on: July 14, 2006, 12:09:50 am »

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!

Wiki updated !

Ciao

Max

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #7 on: July 14, 2006, 12:55:16 am »
With latest modifies of theese days to the wiki, now it is more clear what to do!
Thanks to Mdelfede who updated the wiki with the new infos and to Sethjackson that restyled them.

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?
« Last Edit: July 14, 2006, 01:22:38 am by iw2nhl »

Offline matthewjumpsoffbuildings

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Howdy! Im a noob :)
« Reply #8 on: July 14, 2006, 01:45:26 am »
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 versions
Quote
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

Cheers. And i do hope someone will come along who has made VSTs with the SDK with code:blocks :)

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.

so yea - if someone could walk me thru setting up a project and compiling it - using the adelay example that comes with the vst sdk 2.4 i would be very appreciative :D

PS the wiki main page seems to be missing links? like under the "Installing code:blocks" and "documentation" there used to be a bunch of sub-links their all gone now???
« Last Edit: July 14, 2006, 01:53:37 am by matthewjumpsoffbuildings »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Howdy! Im a noob :)
« Reply #9 on: July 15, 2006, 12:59:49 am »
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 versions
Quote
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

Hello,

I would advice to use the MinGW 5.0.3 installer and chose candidate. This will install the latest packages (those of yours list are a bit out of date :)). And also the gdb debugger is not optional if you would like to debug your code :).

Best wishes,
Michael

Offline matthewjumpsoffbuildings

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Howdy! Im a noob :)
« Reply #10 on: July 15, 2006, 04:34:07 am »
oh so the 5.03 installer is good and uses stable packages?

also - anyone with VST SDK experience in Code:Blocks? I really need a hand :)

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #11 on: July 15, 2006, 02:42:11 pm »
Someone has an answer to my question about the wxWidgets DLL?
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?

VST SDK:
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,
this is quite correct, but you missed the SDK files: you need .cpp files in the 'common' directory, so add them to the project.
Moreover you need (only if you use it) the .RC file and the .DEF file.
Remember also that the linker needs some windows libraries to compile the GUI!
Here is the list of things you need in qmake language, but is easy to understand:
Code: [Select]
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 included all 5 .cpp files, but you do not need all them if you don't use GUI.
There other things to know, so it is better if we open a new thread for this subject, may be useful for other too!

Offline matthewjumpsoffbuildings

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Howdy! Im a noob :)
« Reply #12 on: July 15, 2006, 02:48:41 pm »
thankyou for that info - i will work on it and get back to you - thanks again :D

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: Howdy! Im a noob :)
« Reply #13 on: July 15, 2006, 04:07:53 pm »
If I have time, I try to make a template for VST plugins.

I created an how-to (step by step) for Dev-Cpp, may be you need it for other informations (you have to make 2 little modifies to SDK source files to make them compile with MinGW (not needed for VisualStudio6).

Here the modifies needed (but it's better if you read all the file!):
Quote
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)

Atteched there is the file.

Let me know if you find other useful infos and if can make it work!

The troubles I had with QT, may be are the same for wxWidgets (if you want ot use wxWidgets, else don't care about this!)
More infos on VST+wxWidgets here:
http://www.achitophelconsulting.com/index.php?option=com_content&task=view&id=31&Itemid=78&troozers=33534ca2cab90f665685b30330c6f70c

[attachment deleted by admin]
« Last Edit: July 17, 2006, 09:58:56 pm by iw2nhl »

Offline matthewjumpsoffbuildings

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Howdy! Im a noob :)
« Reply #14 on: July 16, 2006, 08:10:33 am »
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?
Code: [Select]
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

thanks :)