saving internal state example of Max SDK 5.1.6

bodsiin's icon

Hi,

i am following the "Saving internal state" example from Max 5.1.6 SDK:
https://cycling74.com/sdk/MaxSDK-5.1.6/html/chapter__msp__advanced.html

and after some hours trying the code, i decided to surrender... i cannot make it compile in XCode 3.2.2 :-(

here is the code in C i am trying to compile:
http://bodsiin.codepad.org/UtwGxQlO

and here are the Xcode errors:
http://bodsiin.codepad.org/YWJ842eW

any ideas? Hope you can help me, thx a lot! bodsiin

Luigi Castelli's icon

Hard to say without seeing the whole Xcode project and knowing what platform you are working on...

However try this:
in the main window of your Xcode project in the left pane you should see a folder called External Frameworks and Libraries.
You should have two frameworks in there, one called MaxAPI.framework and the other called MaxAudioAPI.framework. I have a feeling that you don't have the latter as part of your Xcode project.

Let me know if it works...

- Luigi

bodsiin's icon

Luigi, thanks for your quick answer!!

You were right, I didn't have the MaxAudioAPI.framework... i think because i was working on a copy of a max example, i pasted the code on a copy of a MSP example and it works, it creates the .mxo file in the sdk-build folder.

However, i can not instantiate in Max, when i type the name of the object i get the error in the Max window:
newobj: myfilter: No such object

I have already added the sdk-build folder to my search path, anything else i have to do to instantiate it?

Thanks! bodsiin

Luigi Castelli's icon

ok, I am glad that was it.

what you should do to make sure your .mxo file is loaded in Max is the following:
in the Max application you go to File->Install and then choose your .mxo file.

If this doesn't do it, it means you are spelling the external's name incorrectly.

- Luigi

bodsiin's icon

Perfect! That made it work...

Thank you so much, bodsiin