1

Recently I have updated to Xcode 5 and now my iOS app crashes on the following code:

float some_var_a = sinf(...);
float some_var_b = cosf(...);

Crash log says the following:

Dyld Error Message:
Symbol not found: ___sincosf_stret
Referenced from: /var/mobile/Applications/702C8CF3-BB96-41F0-9525-5D65B7A581F3/Magic        Encyclopedia: Illusions HD.app/Magic Encyclopedia: Illusions HD
Expected in: /usr/lib/libSystem.B.dylib
Dyld Version: 199.6

As I understood the problem is in sin/cos optimization made by compiler. It tries to calculate both sin and cos values in one call of ___sincosf_stret function, but by some reason there is no such function in the libSystem.B.dylib.

Could anyone please help:

1) Why it occurs?

2) How to solve? Currently I am just avoiding call both sin and cos in one place, and it works. But it's a bad solution.

1
  • Yes, googled a lot. But nothing found. There is similar question, but there is a linker problem. I can build (compile and link) app successfully. But have a crash when run app on the device. Oct 2, 2013 at 9:58

1 Answer 1

7

This error is caused when code is compiled with a deployment target of iOS 7 which is then run on a device < iOS 7.

You need to re-check your project and all dependent library project settings to ensure the deployment target is set correctly (iOS 5.1 in your case).

The library project settings is the likely culprit as a project deployment target is enforced in the app bundle and wouldn't be able to run on a non-compliant device.

3
  • Thank you very much! Really, one of the dependent libraries has iOS 7.0 as the target. Have just fixed it and testing now. Oct 2, 2013 at 10:12
  • Looks like Xcode 5 has silently updated the target to 7.0 when upgrading project, and that was the reason of the problem. Oct 2, 2013 at 10:20
  • Ok so I think it's about time you accepted it then?
    – trojanfoe
    Nov 26, 2014 at 6:38

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.