How to build a dylib for iOS?

24 次查看(过去 30 天)
Woody Master
Woody Master 2017-9-17
When using Matlab 2017a for Mac with a Simulink Model whose target is the ert_shrlib the Matlab Coder builds the dylib (Mach-O dynamic library).
1.) Is that usable on the iOS as well, or only on the OS X?
2.) If not, what could be a way to create the dynamic library for the iOS out of the genereated Matlab Code?
Thanks!

回答(2 个)

Walter Roberson
Walter Roberson 2017-9-17
Yes, dylib are apparently usable on iOS 8 or later (provided they are compiled for the right processor of course.)
  3 个评论
Walter Roberson
Walter Roberson 2017-9-18
Are you planning to go through the App Store to distribute your app ?
Woody Master
Woody Master 2017-9-21
Maybe that would be an easier way to distribute it.
You mentioned the dylib should be compiled for the right processor: In the Matlab Coder Configuration Parameters I have seen adjustments for the Toolchain, for the Code replacement library or for the Data exchange interface. So where should I define the processor?
Or did you mean to just generate Code only for the shrlib target and then bring that into Xcode for the real compilation into a dylib adaptable to the desired processor?

请先登录,再进行评论。


Woody Master
Woody Master 2017-10-8
编辑:Woody Master 2017-10-8
When using the Matlab/Simulink Coder created dylib and trying to integrate that into an XCode project, the following Linker Warning appears:
"...building for iOS Simulator, but linking against dylib built for OSX..."
So, I'm pretty sure that it's not possible to use the dylib directly from Matlab. Has anyone further experience on that? Maybe it will work with "Generate Code only" in Matlab/Simulink and integrate that Code thereafter into an own XCode project for compilation into a Framework...? Has anyone experience on that? Thanks,
Woody

类别

Help CenterFile Exchange 中查找有关 Embedded Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by