fopen$UNIX2003 fails inside external library

后端 未结 1 1586
清歌不尽
清歌不尽 2020-12-11 22:31

I have an external static library (I have the source code as well) that uses \'fopen\' to access files on the filesystem. The strange thing is that it always fails both on s

相关标签:
1条回答
  • 2020-12-11 23:05

    fopen$UNIX2003 is a symbol that is provided by OS X and is not part of the iOS Simulator runtime. iOS is always conformant and thus does not have legacy (non $UNIX2003) variants of functions (which are provided for binary compatibility with code built against older versions of the OS X SDK).

    The common cause of the issue you are seeing is that you have an object file or archive (libsomething.a) that was built against the OS X SDK and are trying to link it into your iOS Simulator executable. That is not supported as the two platforms are not binary compatible at that layer.

    You need to rebuild your library (the libsomething.a) against the iOS Simulator SDK.

    This problem results in an abort at runtime on iOS 7 but is now a link error at build time on iOS 8, and that seems to have helped make these issues much more obvious.

    0 讨论(0)
提交回复
热议问题