Fopen $ UNIX2003 crashes in an external library

I have an external static library (I also have the source code) that uses "fopen" to access files on the file system. The strange thing is that it always fails both on the simulator and on the device when it tries to do this using the EXE_BAD_ACCESS inside fopen$UNIX2003 (not in fopen , fopen not even in the call stack when an exception is thrown. I tried to use fopen directly itself with the same path / parameters, and it works. So, firstly, is it possible that the library somehow calls another implementation of fopen ? If so, then why is the majority important, how can I make it call " right "?

EDIT: Actually, the last function in the call stack before exception was selected _interposition_vtable_unimplemented , fopen$UNIX2003 precedes it.

+3
c ios compilation ios-simulator static-libraries
source share
1 answer

fopen $ UNIX2003 is a character provided by OS X and is not part of the iOS Simulator runtime. iOS is always compatible and therefore does not have an obsolete (not $ UNIX2003) version of the features (which are provided for binary compatibility with code created for older versions of the OS X SDK).

The common cause of the problem you see is that you have an object file or archive (libsomething.a) that was created against the OS X SDK and is trying to link it to the iOS Simulator executable. This is not supported because the two platforms are not compatible with binary data at this level.

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

This issue leads to interruption at runtime on iOS 7, but now it's a communication error at build time on iOS 8, and it seems to have helped make these problems more obvious.

+2
source share

All Articles