c++xcodelivecodeexternals

LiveCode external example for XCode


I thought I'd try writing a simple C++ external for LiveCode. The HelloWorld example given in the tutorial with ExternalEnvironmentsv3 doesn't compile under Xcode 7.2, all sorts of syntax errors (missing {} and semicolons, Bool for bool --- is this VisualStudio code?? ---, deprecated ColorPicker library warnings, and more).

I am familiar with Objective-C, so some are easy to fix but a long time since I did any C++ and there is one syntax error (expecting an expression before EXTERNAL_BEGIN_DECLARATIONS) I can't figure out what it wants; also a "missing line-end at end of file"(???) Since others don't appear to have reported any problem, perhaps am I overlooking something trivial? Or has the sample been updated? Or better, can anyone point me to a simple cpp example which actually works under Xcode?


Solution

  • I don't use the old externals environment stacks to generate projects. I just start a new bundle project and add external.c & h to it. You may be interested in my Xcode templates which help you start an Xcode project in the various ways it can be done.