I’ve built an audio plugin for Windows that I would now like to compile for mac. JUCE has made the whole thing very nice and easy but now I’m trying to integrate some objective-c and I cannot get it to work. I’ve tried following others posts and looking at how JUCE does it and although it compiles properly, I cannot access cocoa objects outside of the directive where I import the library. This is my code:
NSWindow* t; //Works!
NSWindow* t2; //Error: Unknown type name ‘NSWindow’
If I create an NSWindow object right after importing the library in the same #if directive then it compiles no problem but if I create the object anywhere else in my code then it does not recognize it. What am I doing wrong here? Any help would be greatly appreciated!!