Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
156 stars 30 forks source link

Add external library to XCode #181

Open pietrobolcato opened 3 years ago

pietrobolcato commented 3 years ago

Hello there! :)

I am on Mac, and I followed the readme and I am able to succesfully compile the hello world and run it in max. Pretty cool! :) now, the reason why I am creating an external is the fact that I want to integrate a pytorch model to it. Therefore, I downloaded libtorch and I tried to add it in any possible way to XCode IDE but still I am unable to make it work. It always fails the build saying "Unable to find <torch/torch.h>".

Can anybody give me some guidance here? I would very much appreciate it!

Thank you so much in advance :)

isabelgk commented 3 years ago

It sounds like Xcode is not finding the pytorch model header. Which ways have you tried to include the header in the Xcode project?

You may also consider modifying the CMakeList.txt to automatically configure your Xcode environment to include the external library. That would make your project more portable. There's an example here of an open source min project that uses an external library. Perhaps their structure could give you some insights.