09-26-2016, 05:56 PM
(This post was last modified: 09-27-2016, 05:41 AM by Rick Johnson.)
That worked! Or at least it compiled. I'll list what I did in case I did something wrong, and if it's right it could be helpful to others.
- Added the path to Xcode's AI headers to the User Header Search Paths.
- Created a PCH file "SDKPrefixHeader.pch" in my "Headers" folder with the contents:
- Added the path and filename to the .pch file in Xcode's "Prefix Header" field.
- Added "HDI_CORE_DONT_DECLARE_AI_TYPES" to Xcode's Preprocessor Defines.
The first two lines in skelPlugin.cpp now read:
Then I use the following in functions as appropriate:
I'd rather take a simpler approach with a few #includes and declares in the Plugin.cpp file since I only need to make one call to the SDK, but until I understand how to do that without "redefine" errors, I'll stick with what works. Then again, since a copy of my Skel project is already set up, I'll have the option of easily accessing suites in new projects based on it.
Thank you, Garrett!
- Added the path to Xcode's AI headers to the User Header Search Paths.
- Created a PCH file "SDKPrefixHeader.pch" in my "Headers" folder with the contents:
Code:
#ifndef SDKPrefixHeader_pch
#define SDKPrefixHeader_pch
#include "SPBasic.h"
#include "AIUser.h"
extern AIUserSuite* sAIUser;
extern "C" SPBasicSuite* sSPBasic;
#endif /* SDKPrefixHeader_pch */
- Added the path and filename to the .pch file in Xcode's "Prefix Header" field.
- Added "HDI_CORE_DONT_DECLARE_AI_TYPES" to Xcode's Preprocessor Defines.
The first two lines in skelPlugin.cpp now read:
Code:
skel::Plugin* skel::Plugin::__instance = NULL;
AIUserSuite* sAIUser = NULL;
Then I use the following in functions as appropriate:
Code:
sSPBasic->AcquireSuite(kAIUserSuite, kAIUserSuiteVersion, (const void**) &sAIUser);
...
sSPBasic->ReleaseSuite(kAIUserSuite, kAIUserSuiteVersion);
I'd rather take a simpler approach with a few #includes and declares in the Plugin.cpp file since I only need to make one call to the SDK, but until I understand how to do that without "redefine" errors, I'll stick with what works. Then again, since a copy of my Skel project is already set up, I'll have the option of easily accessing suites in new projects based on it.
Thank you, Garrett!