How to include Max SDK Objects in a Min Devkit Solution?

Joe Kaplan's icon

Hi everyone,

I'm working on a package of externals in MIN. It's been going great. But now I want to do a custom UI object. Specifically a custom Textfield object. Support for UI objects, and especially textfield objects, seems a bit limited in MIN. And there's a readymade example in the Max SDK that would be easy to modify to do what I want.

With the recent changes to Max SDK to unify the build architecture, and since MIN Devkit includes Max SDK, I thought this would be easy to do. But not only am I finding it not easy, I've been at it for several hours and I can't find a solution.

Some things I tried:

1) Paste the contents of the the MaxSDK example into the a .cpp min object.

The linter is okay with this. But we have a problem that jpatcher_syms_init() is undefined.

2) Modify the project's CMakeLists.txt to include jpather_syms.c.

Now the project will build. But when I create an instance of the object in Max runtime the object is red. No error, no debug, nothing.

3) Same as above, but replace the headers with #include c74_min.h, and add "using namespace c74::max;" at the top.


Got the same results. Object builds, but appears red when used in Max runtime.

3) Try to generate the project as an actual Max SDK Project:
Copy max-sdk-base folder from the MaxSDK package into my package in the same location.
Copy the source code file and CMakeLists.txt from the MaxSDK example.

Try a few guesses on how to modify CmakeLists.txt in the package root to run the MaxSDK initialization scripts.

Same thing. I can build the object. But when I try to use it in Max, it's red. No error message.

4) I tried several variations of the above, and also attempted to work with a non-UI object.

It all ends the same way. I can build the object, but it is red in the Max runtime.


Has anybody done this before? It seems like recent work on the Max SDK should make this explicitly supported. I was quite surprised to run into difficulties here.

Any input would be much appreciated! Thanks!

Joe Kaplan's icon

:( NEVER MIND!

It turns out I had already answered this question myself ages ago. Sorry for the spam.

As always thanks to 11OLSEN... in the past, in the present, and in the future. :D