[Solved] nullptr compile error

SDK for VST 3 audio plug-in and host development.
Post Reply
howardantares
Posts: 130
Joined: Tue Jun 21, 2016 1:46 pm

[Solved] nullptr compile error

Post by howardantares »

I am getting an error when building projects with v3.6.6 of the VST3 SDK, where "nullptr" is undefined. I have found that this is a c++11 feature. However, I have some other software that is apparently not yet compatible with c++11. Aside from using an earlier VST3 SDK, is there a way to build (under OS X 10.12, Xcode 8) that avoids this error?

willpirkle
Posts: 67
Joined: Tue Jun 21, 2016 12:53 pm

Re: nullptr compile error

Post by willpirkle »

You can fix this in ftypes.h:

In ftypes.h, scroll down to the bottom - this is what mine looks like now, and is set here for VS2008:

-- For non-C++11 compliant compilers (eg VS2008)
//#ifndef SMTG_CPP11_STDLIBSUPPORT
// Enable this for old compilers
#define nullptr NULL
//#endif

#define nullptr NULL will get rid of the error. But when you switch back to another compiler, remember to comment this out.

- Will

Post Reply