Xcode WDL-OL VST3 Semantic Issue; Use of undeclared identifier 'nullptr'

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hi all,
Ive been trying to get this working for about 1 week now but am not making any progress. Cant find any info online and nobody seems to care enough/know enough to answer with any kind of solution.....(on Cocos/Reaper forums)

Im trying to get Xcode to compile VST3 plugin. Using WDL-OL framework. Fresh install of MacOS Sierra. Using this guide for setup: http://martin-finke.de/blog/articles/au ... up-wdl-ol/ (http://martin-finke.de/blog/articles/audio-plugins-002-setting-up-wdl-ol/) Also using XcodeLegacy to install all libs/sdk's. App,VST2 and AU compile/work. VST3 and AAX do not.

Code: Select all (#)

wdl-ol/VST3_SDK/public.sdk/source/common/memorystream.cpp:41:1: 
Use of undeclared identifier 'nullptr'
memorystream.cpp

Code: Select all (#)

IMPLEMENT_FUNKNOWN_METHODS (MemoryStream, IBStream, IBStream::iid)
static const TSize kMemGrowAmount = 4096;
I've tried all 3 compilers, different base sdk's. When C++ Language Dialect is set to C++11 or GNU++11 i get a different Semantic Issue error:

Code: Select all (#)

wdl-ol/WDL/IPlug/IGraphicsMac.mm:279:21: Non-constant-expression cannot 
be narrowed from type 'int' to 'CGFloat' (aka 'double') in initializer list 
IGraphicsMac.mm

Code: Select all (#)

NSSize size = { w, h };
[(IGRAPHICS_COCOA*) mGraphicsCocoa setFrameSize: size ];
Different environments tried'
Xcode8.1 - MacOS Siera10.12.11 (fresh-install!)
Xcode6, 6.1, 7, 7.2.1, 7.3.1 - Yosemite10.10.5 (old setup)

I just dont know what else to try...... Help? :cry:

Post

The first error is correctly identified by you as lack of C++11 support. The second; just go ahead and fix the issues (the tooltips will tell you how). There are multiple of these errors scattered around, and they are picked up as C++ compilers get more conforming.

Checking out the tip of IPlug reveals that the error is fixed, so you're using an old version of IPlug.

Post

Yes unfortunately, that tutorial website gives some really bad advice to checkout an ancient commit of WD LOL, which seems to cause a lot of people trouble!

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Mayae wrote:The first error is correctly identified by you as lack of C++11 support. The second; just go ahead and fix the issues (the tooltips will tell you how). There are multiple of these errors scattered around, and they are picked up as C++ compilers get more conforming.
Checking out the tip of IPlug reveals that the error is fixed, so you're using an old version of IPlug.
Ok, so i was using an old version of WDL-OL. I was following the guide: http://martin-finke.de/blog/articles/au ... up-wdl-ol/ (http://martin-finke.de/blog/articles/audio-plugins-002-setting-up-wdl-ol/) there it states to use the same version as he did at the time of the article, so thats what i've been doing.......("git checkout 0a360c90b3460717210eeaee7464bc7009c9a5ba .")

I've now re-installed the latest version and i can definitely see differences.
Im pretty sure that the 'tool-tips' never popped-up before but i might be wrong... One identified its self and i fixed it, however, the next error does not give me a 'tool-tip'.

Code: Select all (#)

Plugin-Development/wdl-ol/VST3_SDK/public.sdk/source/common/memorystream.cpp:41:1: Use of undeclared identifier 'nullptr'
memorystream.cpp

Code: Select all (#)

IMPLEMENT_FUNKNOWN_METHODS (MemoryStream, IBStream, IBStream::iid)

Code: Select all (#)

Plugin-Development/wdl-ol/VST3_SDK/pluginterfaces/base/funknown.h:159:2: Expanded from macro 'IMPLEMENT_FUNKNOWN_METHODS'

Code: Select all (#)

Plugin-Development/wdl-ol/VST3_SDK/pluginterfaces/base/funknown.h:152:9: Expanded from macro 'IMPLEMENT_QUERYINTERFACE'
I've read a post by @Oli Larkin i remember mentioning to better stay away from Xcode' "Update to Recommended Settings" feature, should i never update or should i?
Also; SDK version; 1.5still? should i move higher?
Last edited by pigeons7bananas on Fri Dec 02, 2016 4:57 pm, edited 1 time in total.

Post

yes avoid that xcode Update to Recommended Settings"

Post

Am i seriously stupid and missing something? :idea: :?:

Post

pigeons7bananas wrote:Am i seriously stupid and missing something? :idea: :?:
You're still compiling without C++11 support, google xcode and C++11. Nullptr is a compiler intrinsic after C++11

Post

The latest WDL shows this:

NSSize size = { static_cast<CGFloat>(w), static_cast<CGFloat>(h) };
[(IGRAPHICS_COCOA*) mGraphicsCocoa setFrameSize: size ];

Add the casts to see if that gets you past the error.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

The thing is your C++ compiler doesn't support C++11, and that's why it complains that it doesn't know what "nullptr" is. I'm not too familiar with Apple's compilers, but you need to look up if there's C++11 support in Xcode and get at least the version that supports it (if there's one). It might also be a hidden option that you need to enable.

Post

Xcode supports c++11 (4.2 onwards, so you're fine with 6+).

You just need to set the correct flags in your vst3 target settings in Xcode from the drop down menus for each value:
C++ Language Dialect -> C++11 [-std=c++11]
C++ Standard Library -> libc++ (LLVM C++ standard library with C++11 support)

or in common.xcconfig
CLANG_CXX_LANGUAGE_STANDARD = c++0x
CLANG_CXX_LIBRARY = libc++

compiler set to the default: Apple LLVM

Post Reply

Return to “DSP and Plugin Development”