Post by Rob on Jan 30, 2014 13:21:12 GMT 1
This is not a final tutorial, when I have some more time I want to do a real step by step instruction with images because that's probebly easier to follow.
- Download and install: codeblocks-13.12mingw-setup
- Download and install: tdm64-gcc-4.8.1-3 to the C: drive.
- Download and unpack: Synthedit SDK3, to e.g. C:\SE_SDK3.
- To build x64 modules, you need a x64 compiler. I use "MinGW-w64 - for 32 and 64 bit Windows".
It's a combined compiler, you could also build x86 modules(*see the note at the bottom if you want to do that) with it, but I got errors while doing that so I use a seperate x86 and x64 compiler.
In the installer you can choose which version to install, personally I went with version 4.8.5.
Create your modules using either a copy of "Gain" example in the SDK3 folder, or thru the "build skeleton code" option in Synthedit (and move the created files to a new directory in the SDK3 folder with the required name), with your own code inserted. I recommend using Build Skeleton code, if you want to combine your modules in 1 file. Else you'll run into problems with the class names etc ( been there, done that ).
- In Codeblocks create a new project, and choose for user templates on the left side of the create project window.
- Choose DSP or GUI mods, and browse for the folder with your project files.
- Give your project a name in the "Change project's filename" windows, this will also be the name of the module you create.
- On the left you should see your project name, rightmouse on that name and choose "Add files".
- Add the .cpp / .h / .xml / .rc files from your project folder.
- Next do rightmouse again on your project name, go a folder up to "se_sdk3" directory and add:
- For DSP modules add: mp_sdk_audio.cpp, mp_sdk_audio.h, mp_sdk_common.cpp, mp_sdk_common.h
- For GUI modules add: mp_sdk_gui.cpp, mp_sdk_gui.h, mp_sdk_common.cpp, mp_sdk_common.h
- Now you're ready to add your code, it will look like this on the left, build the 32 bit module with CTRL + F11. Changing from Debug to Release is found in the top menu.
- How to add and change the code isn't included in this tutorial.
64bit modules:
- First make a copy of your project, rename it so you know it's the 64bit version.
- To build 64 bit modules, you need to change the compiler used.
- Change these settings at: Settings > Compiler > Toolchain Executables.
- Compiler's Installation Directory: Point to the installation directory of the 64 bit compiler.
- C-Compiler: mingw32-gcc.exe to x86_64-w64-mingw32-gcc.exe
- C++ Compiler: mingw32-g++.exe to x86_64-w64-mingw32-g++.exe
- Linker for dynamic libs: mingw32-g++.exe to x86_64-w64-mingw32-g++.exe
- Close with "Ok".
- Next goto "Project > Build options > Debug > Pre/Post Build steps.
- Remove "(x86)" from the location to copy the created .sem to.
- Do the same for the Release build.
- Close with "Ok".
- Choose Build.
Credits: Jeff, Xavier and Andrew.
Links:
- Jeff his old tutorial
- Xavier tutorial
- Synthedit SDK usergroup
* Note for building x86 & x64 modules with the combined MingW compiler, by Andrew:
Right of the bat - this will compile 64 bit programs, but with 32 bit you need to add a custom build script for for your ".rc" file.
In CodeBlocks -rightclick on the ".rc" file - select->properties->advanced-> tick -> "Use custom build command for this file" -> now add this and save:
$rescomp -Fpe-i386 -i $file -J rc -o $resource_output -O coff $res_includes
That "i386" part tells the compiler that the ".rc" file should be 32 bit, in-theory - the compiler should actually do this automatically... and that's it.
- Download and install: codeblocks-13.12mingw-setup
- Download and install: tdm64-gcc-4.8.1-3 to the C: drive.
- Download and unpack: Synthedit SDK3, to e.g. C:\SE_SDK3.
- To build x64 modules, you need a x64 compiler. I use "MinGW-w64 - for 32 and 64 bit Windows".
It's a combined compiler, you could also build x86 modules(*see the note at the bottom if you want to do that) with it, but I got errors while doing that so I use a seperate x86 and x64 compiler.
In the installer you can choose which version to install, personally I went with version 4.8.5.
Create your modules using either a copy of "Gain" example in the SDK3 folder, or thru the "build skeleton code" option in Synthedit (and move the created files to a new directory in the SDK3 folder with the required name), with your own code inserted. I recommend using Build Skeleton code, if you want to combine your modules in 1 file. Else you'll run into problems with the class names etc ( been there, done that ).
- In Codeblocks create a new project, and choose for user templates on the left side of the create project window.
- Choose DSP or GUI mods, and browse for the folder with your project files.
- Give your project a name in the "Change project's filename" windows, this will also be the name of the module you create.
- On the left you should see your project name, rightmouse on that name and choose "Add files".
- Add the .cpp / .h / .xml / .rc files from your project folder.
- Next do rightmouse again on your project name, go a folder up to "se_sdk3" directory and add:
- For DSP modules add: mp_sdk_audio.cpp, mp_sdk_audio.h, mp_sdk_common.cpp, mp_sdk_common.h
- For GUI modules add: mp_sdk_gui.cpp, mp_sdk_gui.h, mp_sdk_common.cpp, mp_sdk_common.h
- Now you're ready to add your code, it will look like this on the left, build the 32 bit module with CTRL + F11. Changing from Debug to Release is found in the top menu.
- How to add and change the code isn't included in this tutorial.
64bit modules:
- First make a copy of your project, rename it so you know it's the 64bit version.
- To build 64 bit modules, you need to change the compiler used.
- Change these settings at: Settings > Compiler > Toolchain Executables.
- Compiler's Installation Directory: Point to the installation directory of the 64 bit compiler.
- C-Compiler: mingw32-gcc.exe to x86_64-w64-mingw32-gcc.exe
- C++ Compiler: mingw32-g++.exe to x86_64-w64-mingw32-g++.exe
- Linker for dynamic libs: mingw32-g++.exe to x86_64-w64-mingw32-g++.exe
- Close with "Ok".
- Next goto "Project > Build options > Debug > Pre/Post Build steps.
- Remove "(x86)" from the location to copy the created .sem to.
- Do the same for the Release build.
- Close with "Ok".
- Choose Build.
Credits: Jeff, Xavier and Andrew.
Links:
- Jeff his old tutorial
- Xavier tutorial
- Synthedit SDK usergroup
* Note for building x86 & x64 modules with the combined MingW compiler, by Andrew:
Right of the bat - this will compile 64 bit programs, but with 32 bit you need to add a custom build script for for your ".rc" file.
In CodeBlocks -rightclick on the ".rc" file - select->properties->advanced-> tick -> "Use custom build command for this file" -> now add this and save:
$rescomp -Fpe-i386 -i $file -J rc -o $resource_output -O coff $res_includes
That "i386" part tells the compiler that the ".rc" file should be 32 bit, in-theory - the compiler should actually do this automatically... and that's it.