current/latest tools+SDK for building C++ Max externals???

Ben Jacobs's icon

Hello Max dev community!

I've been out of the Max game for quite a long while and looking to set up my current dev machine (Mac Mini M4, OS 15.x) for building Max 9 compatible externals, coding in C++. My target platform will be MacOS only. I intend to figure out RNBO export some other day.

The dev documentation I'm finding seems fairly stale. Written in 2022, it's talking about "new" support for M1 silicon and MacOS 10.15 (!). Hoping some kindly soul would respond here with fresh advice on the latest/greatest supported (i.e. C74 friendly) versions of the various related tools. Or simply point to more recent docs in case I've overlooked them somewhere.

Specifically:

  1. XCode -- documentation mentions XCode 12. Current version on Apple Store is XCode 16.4. What's the latest version anyone is actually using successfully for Max external development? Any specific need to hunt down a legacy version?

  2. CMake -- same questions again. Documentation refers to CMake 3.19; current stable release is 4.0.3. Any known incompatibilities introduced with 4.x?

  3. Max SDK -- C74 dev page points to version 8.2.0 on GitHub, released in 2021. Could someone verify whether this is indeed the latest stable SDK release (and any known compatibility issues with more recent XCode/CMake versions above)?

  4. Min-DevKit -- if I'm going to code in C++, is Min-DevKit (last significant update to docs in 2022) still the way to go? Necessary?

I have to assume that someone out there is happily and successfully building stuff on current generation MacOS + hardware. Will be most grateful if such person wants to save me (and any future travelers) a bunch of needless trial and error on this :-)

-Ben

JBG's icon

Hi!

My advice would be to just give it a go. Start by building the examples in min-devkit or max-sdk with whatever version of the tools you have installed. I wouldn't expect you to have any compatibility issues. For me, everything runs just fine on an M2 MBP14 / MacOS 15.2 / CLion 2025.1.3 / CMake 3.31.6 (bundled, haven't updated to 4.x yet). I haven't tried Xcode in years, so I can't give you any pointers there unfortunately

As you say, both the max-sdk and min-devkit are rather stale (we're still waiting for access to features released in Max 8.6 / jan 2024) but the C74 devs are occasionally fixing bugs, so I'd recommend using the main branch of the corresponding repo rather than the dated releases!

If your goal is to code in C++, min-devkit is the way to go. Unless you're highly proficient in git and cmake and want to set up your own repo from scratch, the package creation script is probably a good starting point to start developing your own externals See Rob's reply below for way better package templates (the min template can be found here)

Rob Ramirez's icon

echo the above with the additional suggestion that the package template is a great way to start https://github.com/Cycling74/max-package-template

there's one for min too.

would also add that min is not required for c++ development, but is worth checking out.

JBG's icon

@Rob: Didn't know about these, thanks for sharing!

Ben Jacobs's icon

Hi JBG and Rob,

Greatly appreciate these prompt and helpful responses. I hope this thread may be useful for others as well.

Especially happy to hear that XCode seems unnecessary for the single task of building Max externals. I'm not committed to any particular IDE at this point. I'll see if I can persuade CMake to generate for my current default IDE (VS Code), otherwise might give CLion a try. Expect I'm really just using the IDE for code editing anyhow, running builds directly on command line. Only reason I was asking about XCode at all was because the docs mentioned no alternative as far as I could tell. I have no plans to build anything else whatsoever for the Apple ecosystem, so thrilled to bypass XCode bloat for now.

I think my next step will be to hunt down completed C++ source code for someone else's Max external (ideally something which gives the SDK a good workout) and get that to build/load/execute in Max 9 successfully. Then I'll follow Rob's suggestions re the C74 max-package-template or min-package-template as base for my own C++ project.

Thanks again folks!

noddy-oer's icon

Are the instructions anywhere for setting this all up? It'd be wonderful to have a guide for setting up CMAKE, the SDK, and get started working with the template.

Regardless, this thread came at the perfect time! I was just thinking of porting a couple of plugins as Max externals to share with folks.

👽'tW∆s ∆lienz👽's icon

there was also this video in case it helps:

Ben Jacobs's icon

Thanks @"👽'tW∆s ∆lienz👽"... I shall take a look at this video.

@Noddy-Oer - I haven't actually worked through any of the posted instructions yet myself, so can't comment re value. As other suggested, there's a certain inevitable quantity of just slogging through the setup for oneself and seeing what actually works nowadays. Folks here have given some good pointers to at least verify the specific tools and versions they are using successfully, which is a great leg up. Even on much more mainstream developer platforms/SDKs with loads of slick "quickstart guides" on offer (yeah Google DevRel, talkin about you)... seems to me like I spend more than half my learning curve just bushwhacking through whatever build steps no longer work as described.

That said, below are the top bookmarks I've accumulated so far relevant to C74 external dev with C++. These all at least looked promising on a first glance. YMMV for sure. My gut is telling me to be especially mindful of any instructions for getting the signing right... seems like that causes some pain for developers on every major version bump for MacOS (not to mention Apple's history of major processor/architecture changes).

Not sure when I'll really get moving on this myself, but will be happy to update here with any further learnings. Best of luck!

dmj's icon

Hi,

On this topic. I'm currently translating a library I made in Pure Data long ago into Max. I'm using the min-dev kit, and would like to know the dev community consensus or best practices on using inlets versus arguments for object parameters in Max.

Should parameters generally be exposed as additional inlets or just attributes, keeping just one inlet for triggers or signals? Is there a preference or philosophy in Max development regarding this? Are there cases where one approach is clearly better for patch readability, usability, or maintainability?

Any advice or references to official recommendations or notable discussions would be appreciated!

DMJ

mzed's icon

I doubt there is a consensus, but I'm glad to share my opinion.

For new objects, I generally tend to limit the number of inlets. The attribute system didn't exist in the early days of Max, so you'll see older objects (eg counter) with a lot of inlets. I find this difficult, and I still need to check to documentation to remember which inlet is which. For complex objects, attributes are generally better for readability, etc.

There are exceptions, of course. Parameters that are constantly changing probably want to have their own inlet. For example, I wrote an object that to a current x, y, z and calculated a new x, y, z from it. Having three ins and three outs made sense, with attributes to define constants in the transfer function. True "variables" make sense to me as inlets, where as parameters that define object state are more suited to attributes.

I generally prefer attributes over arguments. I will use arguments to set default values for inlets, or maybe one (and only one) for something non-optional that needs to be set -- like an audio buffer name that is connected. It would be annoying to have to type buffer~ @name foo all the time.