developing external for max7

thetechnobear's icon

Hi.

so a while back I developed an external for Max6, and went thru the pain of working out the build system.
Im back again... and now trying with the Max7 SDK... and realised Ive forgotten most of it :)

(this is on macOS 10.12, with latest Xcode, and latest max7 sdk from GitHub)

Ive no issue with the code just making it build :)
the sdk help files is great for explaining the API, but really doesnt talk at all about setting up the build environment :(

so Ive a couple of questions, id really appreciate it if others could help me with....

- is there a C++ interface ? or do I still have to have a C wrapper, to then hit my C++ objects

- for xcode, is the correct process...
copy maxmspdsk.xcconfig , and then edit it to reflect your environment (e.g. sdk location)

- how do you link in your own externals?
ive tried to alter the link link in the xcconfig file, but it seems to be ignored eg

OTHER_LDFLAGS = -L$(SRCROOT)/../build/release/lib -framework MaxAudioAPI -framework JitterAPI $(C74_SYM_LINKER_FLAGS) -lmec-api -Wl,-rpath,$(SRCROOT)/../build/release/lib

the whole maxmspsdk.xcconfig, seems to be very complex compared to just using makefiles...
I'll admit I dont use Xcode much, more makefiles/cmake .. has anyone used cmake on a max external project that would be so much easier to manage .

or have I missed some document, which explains how to create a max external from scratch (simple) that you dont put in the SDK source folder!

thetechnobear's icon

ok, Ive just stumbled on the max-api and max-devkit

are these replacing the max-sdk, since the readme refers to the sdk as the 'legacy max sdk'

this api looks much more interesting to me, given the build is via cmake, and appears to be 'cross platform' rather than maintaining a project file for each platform - also it looks quite low-level, which might suit my project (which is integrating 3rd party hardware controllers)

Im building something new, and doesn't need much to integrate with max, this looks like a promising direction.
however, I can find little documentation on it, or comments on using max-api vs max-sdk.

the readme mentions the sdk has more 'features', does this mean it is in its early stages to eventually replace the sdk? but perhaps is not complete yet?

is there a document discussing the pros/cons? or when to use it vs the max-sdk?

j_kusel's icon

posting in solidarity with this thread - the documentation for the code base itself is fine but the readme for the Max-DevKit is abysmal. Eric Lyon's text on externals makes building for PD a breeze (

Dirk's icon

the max-devkit uses git submodules to wrangle in max-api -- make sure you source both projects when attempting the walkthrough. if you prefer to download zips from github, make sure you download both max-devkit and max-api zip files and unzip them. you'll have to rename max-apiWHATEVER to plain max-api, then drag it into the max-devkit/source overriding the empty folder by the same name.

if you prefer to use git clone, clone max-devkit, then complete the following to source max-api submodule:

git submodule init
git submodule update

either approach gives you all the bits you need -- now just follow your platform's build steps per the walkthrough and your tasty new reference externals will be sitting in the max-devkit/externals folder ready to slide into your Max path

hth,
D