Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
cstream.h syntax error
No permission to create posts
August 12, 2016
4:16 am
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Hi synthusiasts,

In order to get the vibe starting I compiled the VST3 MiniSynth.sln in VS 2015 Express for Windows Desktop after 'installing' (placing in root C://) the SDK VST3 files and after putting all VST3 synth projects from the book in the right folder, as per book under MyProjects etc. in the right VST3 SDK folder hierarchy. So far so good ...

Compiling seemed to make my face smiling ... . Laugh Not. At the end 4 errors appeared in the output as follows:

1>------ Build started: Project: base_vc10, Configuration: Debug Win32 ------
1> base_vc10.vcxproj -> C:\VST3 SDK\base\win\Win32\Debug.base_vc10\base_vc10.lib
2>------ Build started: Project: MiniSynth, Configuration: Debug Win32 ------
2> conststringtable.cpp
2> funknown.cpp
2> ustring.cpp
2> vst3editor.cpp
2> vst3groupcontroller.cpp
2> vst3padcontroller.cpp
2> vstgui_uidescription_win32.cpp
2> vstgui_win32.cpp
2>c:\vst3 sdk\vstgui4\vstgui\lib\platform\win32\win32support.cpp(66): warning C4996: 'GetVersionExW': was declared deprecated
2> c:\program files (x86)\windows kits\8.1\include\um\sysinfoapi.h(442): note: see declaration of 'GetVersionExW'
2> pluginview.cpp
2> dllmain.cpp
2> pluginfactoryvst3.cpp
2> vstaudioeffect.cpp
2> vstbus.cpp
2> vstcomponent.cpp
2> vstcomponentbase.cpp
2> vsteditcontroller.cpp
2> vstguieditor.cpp
2> vstinitiids.cpp
2> vstnoteexpressiontypes.cpp
2> vstparameters.cpp
2> Generating Code...
2> Compiling...
2> DCA.cpp
2> DelayLine.cpp
2> EnvelopeGenerator.cpp
2> factory.cpp
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): warning C4003: not enough actual parameters for macro 'max'
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): error C2589: '(': illegal token on right side of '::'
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): error C2059: syntax error: '::'
2> Filter.cpp
2> LFO.cpp
2> MiniSynthVoice.cpp
2> ModulationMatrix.cpp
2> MoogLadderFilter.cpp
2> Oscillator.cpp
2> pluginobjects.cpp
2> QBLimitedOscillator.cpp
2> StereoDelayFX.cpp
2> VAOnePoleFilter.cpp
2> Voice.cpp
2> VSTSynthController.cpp
2> VSTSynthProcessor.cpp
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): warning C4003: not enough actual parameters for macro 'max'
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): error C2589: '(': illegal token on right side of '::'
2>c:\vst3 sdk\vstgui4\vstgui\uidescription\cstream.h(45): error C2059: syntax error: '::'
2> Generating Code...
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Anyone any idea what I can do to get a successful build?

Kind regards,
Robin

W10-64bit / VST SDK 3.6.6 / VS Express 2015 (=2014)

August 14, 2016
1:16 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Robin

You are the first to stumble onto this issue, related to the new VST3SDK 3.6.6... Fortunately the solution is easy, but it also means I need to redo the Synth book project code (barely) for SDK 3.6.6 to stop the problem.

First, the errors are coming from the fact that the min and max macros are defined in both the std:: library (which VSTGUI uses) as well as in which almost all windows programs must include, including ours. The typical solution is to modify your C++ Preprocessor definitions to include:

NOMINMAX=1

However, this #define is already done for us in the vstgui.h file so technically we should not need to add it (and that was true for SDK 3.6.0 and 3.6.5 where the Synth book projects built without an issue).

One of the things that I've noticed is that with each new SDK version, Steinberg will often re-order the #includes of various files in their .h and .cpp files. It turns out that the ordering of the #includes is very important (see the Forum topic about adding the VST2 wrapper to your synth projects - where you place the #include is crucial).

This is what has occurred with the 3.6.6 SDK (*sigh*) and so the simplest fix is to edit your VSTSynthProcessor.h file and add a new #include for vstgui.h at the top of the list like this:

#ifndef __vst_synth_processor__
#define __vst_synth_processor__

#include "vstgui/vstgui.h" //< General and change the output file to:

$(PlatformName)\$(ConfigurationName)\$(ProjectName).vst3

which will place the 64 bit version in your /x64/Debug or Release folder.

BTW - while testing today I did notice that the MiniSynth GUI shows up fine in Cubase, but not in Reaper - a fundamental problem with debugging is that the Steinberg sample code note_expression_syth_with_GUI (in v3.6.6) has the same issue - its GUI does not show up in Reaper : ( However, I do have a fix for this (still not sure why Cubase is OK but Reaper is not) and I will update the Synth projects as soon as I can.

- Will

August 14, 2016
2:49 pm
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Hey Will,

Thanks! And ... sorry to keep you so busy.

The #include "vstgui/vstgui.h" solves the cstream.h but generates 241 extra errors (8-)), for MiniSynth that is. For DigiSynth however it yields a clean and errorfree compilation though, for AniSysnth also other errors. You probably want to see the error lists (which are quite long). I'll first check some other synths today as well and come back to this post with more results.

(I'll wait with testing VST3s on my 64 bit DAWs (Ableton Live and Cakewalk SONAR) and on NI's Maschine (which can load VSTs too). That is for later.)

Keep you posted.
Robin

August 14, 2016
5:25 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hmmmm.

The #include vstgui.h gave me a clean compile with VS2015 in both 32 and 64 bit modes with the MiniSynth code from the website. You will need to edit your Linker's output path to avoid that error. Perhaps you could mail me your error list? Also, did you try setting the NOMINMAX=1 in your Preprocessor definitions? Also, there are a ton of warnings (almost all are from VST) but mine did compile and show up properly in Cubase.

I will be going over all the Synth projects this week as I'm teaching my Synth Plugin class this semester so hopefully I can knock out these VSTSDK 3.6.6 issues.

Note that Ableton does not load VST3 plugins, it only does VST2 (as of Live 9). You will need to add the VST2 wrapper to your project to see the plugin in VST2-only clients.

As Tom pointed out, there are still some vendors that are (still) hesitant to migrate to VST3 so that is always a problem for us - we have to rely on the VST2 wrapper that Steinberg supplies.

- Will

August 15, 2016
12:14 am
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Actually, 64 bit debug building yields 1 error and 71 warnings for Minisysnth:

2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1231,5): error MSB3191: Unable to create directory "C:\Program Files\Common Files\VST3\Steinberg". Access to the path 'C:\Program Files\Common Files\VST3\Steinberg' is denied.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The list for 32 bit debug building contains 214 errors, and only 7 or so warnings. Should I c/p them here?

For both the properties in base_vc10 and MiniSynth I changed $(PlatformName)\$(ConfigurationName)\$(ProjectName) into $(PlatformName)\$(ConfigurationName)\$(ProjectName).vst3 in the properties under Configuration properties / General for the output directory as well as for the intermediate directory. I did this for Debug x64 and Release x64, but not for Debug Win32 and Release Win32. That's correct, right?

For both for base_vc10 and Minisynth I changed the Target platform from version from 8.1 into 10 (also under General).

I have not tried the setting NOMINMAX = 1 in ... errr ..the Preprocessor definitions? Where are they?

Also, the factory.cpp gies an error for line 1 ... command line error. All errors start and seem related to LINK 2001 ... :
2>factory.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall Steinberg::FObject::queryInterface(char const * const,void * *)" (?queryInterface@FObject@Steinberg@@UAGJQBDPAPAX@Z)

It's dazzling ...

need coffee ... be right back ­čśë

Robin

August 15, 2016
12:56 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

OK, your errors are related to changes to the output directory stuff.

1) in the base_vc10 project, do not change anything - it is already setup to write the library to the proper location. Changing that project's output settings is the reason you are getting the hundreds of errors. Your VST3 plugin project (MiniSynth) must link to the static library you first compile (base_vc10) -- this is the VST3 paradigm (you compile the base library, then link your plugin to it afterwards) and is the same as AAX for Pro Tools. By changing the output directory, it messed up the second linking.

2) only change the Output *File* name in the MiniSynth project, not any of the directories. You go to the Linker / General panel and use $(PlatformName)\$(ConfigurationName)\$(ProjectName).vst3 for the Output File (for x64 you need this, optional for Win32). Do not change any of the other settings for the directories.

3) the 3.6.6 SDK also changed the way they named the projects in a different way (*sigh again*) and I will try to update the Synth Projects to match the new convention. I don't want to explain it here because it will only confuse you more. Isn't supporting other people's SDKs a lot of fun when they change stuff on each new version?

But, I do know that MiniSynth will compile correctly with the new #include and the proper output file paths setup in 3.6.6 for both x86 and x64.

University starts tomorrow so I will only have limited time to work on this during the week. I will try to have the 3.6.6 versions of the synth projects done in the next week - I need them for my own synth plugin classes too.

Tonight, I am releasing a huge RackAFX update (in beta) to v6.8 which is now thread safe for RackAFX projects (the derivative projects were essentially thread safe by design) - I will be posting release notes on that tomorrow. it is in Beta only - this is what I've been working on since July 1 and I'm glad this is ready to go!

- Will

August 15, 2016
1:17 am
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Thanks Will,

OK, I'll manage. Some work ahead. Cool
And for you good fun with class this week!

Cheers,
Robin

August 15, 2016
2:27 am
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Sorry Will,

I forgot this: The topic refers to MiniSynth, yet the #include "vstgui/vstgui.h" solution in your first reply in this topic did however work for Digisynth, without the Output file modification and output directory stuff, for Win32 and x64!

OK, back to MiniSynth: I changed it according to your replies, Output file in Linker/General for x64 etc., no messing with output directories, and compiled for both Win32 and x64, both yield 213 errors now. All referring to error LNK 2001: unresolved external symbol ...

Cheers.
Robin

August 23, 2016
7:56 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

All the issues in the posts above were caused by either the new 3.6.6 SDK, or incorrect settings in the user's VS Solution Properties. Robin emailed me confirming that this was the case.

Today August 23, 2016 I have uploaded the new VST3 Synth Projects for the VST3 SDK 3.6.6 which correct any problems you may have with the older versions, streamline code, and all pass VST Validation testing 100%. They have all been fully tested in both configurations (Debug/Release) as well as both bit-depths (32 and 64 bit) and will all compile properly and generate proper plugins. Make sure you follow directions in the book about where to located the projects within the VST3 folder hierarchy.

You can download the projects at:

http://www.willpirkle.com/synt.....-projects/

You must use the VST3 SDK 3.6.6 which was released in June 2016 from Steinberg.

- Will

August 23, 2016
11:08 pm
Avatar
Robin
Member
Members
Forum Posts: 8
Member Since:
July 26, 2016
sp_UserOfflineSmall Offline

Awesome! Thanks!
(compiling goes flawlessly...)
Smile

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msalda├▒a: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143