5

I know this has been asked before but the answers at those questions don't address my solution. thats why i have to post a new question.

the problem is previously I have linked libcommonCrypto.dylib and built the project the error was

ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/libcommonCrypto.dylib.
 Link against the umbrella framework 'System.framework' instead. for architecture armv7

after searching over the google tried the following solutions

  1. added libz.dylib
  2. added SystemConfiguration.framwork
  3. imported

it was stated at one place that i should add JavaScriptCore.framework but in framework list of Xcode I wasn't being able to find this framework

STill the error remains..

Any help .. what am i doing wrong ??

Dev_Dash
  • 376
  • 3
  • 7
  • possible duplicate of [CommonCrypto isn't building for arch armv7 iOS](http://stackoverflow.com/questions/12547711/commoncrypto-isnt-building-for-arch-armv7-ios) – Rajesh Feb 20 '14 at 10:58
  • @user1554347 : already tried solution by that link. (i.e adding libz.dylib). didn't work though – Dev_Dash Feb 20 '14 at 11:22

2 Answers2

8

I had the same problem. and don't know the exact reason why this worked.. but try this if this help.

go to Project Target >> summary tab >> see the section- Linked Frameworks and Library >> select the two libraries (libz.dylib, libcommonCrypto.dylib) >> and hit the "-" button at the bottom of the section.

now build the project.. i think it should work now, mine did.

hope it does solves your problem.. happy coding.

Pawan Joshi
  • 1,581
  • 3
  • 20
  • 40
  • 1
    WOW.... that really did the trick... how the hell did you came by this ? thanks any ways – Dev_Dash Feb 20 '14 at 12:11
  • For me it does not work - as I cannot add them - actually there is no libz or libCommonCrypto dylib only .tbd files, and when I add them - linker fails again, suggesting that I link against the "System.framework" instead - which, alas, is not on the list too. I'm stuck. – Motti Shneor Apr 02 '18 at 04:47
0

Add "${SDKROOT}/usr/lib/system" to your LIBRARY_SEARCH_PATHS. The other solutions do this inadvertently. That's probably why they work, but linking against JavaScriptCore.framework (for example) isn't required. You just need to expose the system libs to your project.

Link
  • 427
  • 4
  • 5
  • That did not help for me. Error remains as is. Furthermore, Linker suggests that I use some umbrella framework - "System.framework" instead of the libcrypto but when I try to add it - it does not exist, or at least is not in the list of frameworks I can choose from. – Motti Shneor Apr 02 '18 at 04:32