Xcode 7.1 for iOS 9 is missing libC ++. dylib required for Objective-C Realm Static Framework

I am following this document to integrate an area into my iOS application.

Static Realm Infrastructure for iOS

My problem is at step 3. I cannot find libC ++. dylib. I find several other .tbd, but none of them is libC ++.

I followed several other SO messages using the "add another" option and executing the + shift + G command and discovering this library, but it is also not on this list.

Does anyone know any workarounds?

+8
ios objective-c xcode ios9
source share
4 answers

I had the same problem. I found some way.

  • Go to Phase Building> Linking Binary Files with Librairies +> Add Another
  • As soon as in the file selection window do "CMD" + Shift + G (go to the folder) and type / usr / lib /
  • From / usr / lib you can add: libC ++. dylib and more ... Compile and have fun.
+14
source share

I have the same problem. I can not find libC ++. Dylib via xcode, but I found it using terminal.

You can copy or create a link to the visible folder in xcode, for example / Users // Downloads.

The command below can help fix the problem.

ln -s /usr/lib/libc++.dylib /Users/<your user>/Downloads/libc++.dylib 
+3
source share

This is a known issue in the beta version of Xcode 7.

To work around this problem for now, please: Remove all links to .tbd files either from the linked libraries phase or from the copied package resources phase (where they will sometimes be added). Add the library that you want to link manually to the "Other Linker Flags" assembly settings by adding the argument: -l<library_name> for each library that you want to link (for example, add " -lsqlite3 " (without quotes)).

For those who are interested, .tbd files are the new โ€œtext stub librariesโ€ that provide a much more compact version of stub libraries for use in the SDK and help significantly reduce the size of the downloaded file.

- copy link

Finally, you can add -lc++ to this Other link Flags parameter

+2
source share

I had a similar problem with Realm the next week after updating iOS 9. I know that you have already tried the phase construction method, added others, CMD + shift + G without success. However, this was the method that I used to detect libC ++. Dylib, and I just checked it now and was able to find it.

It is also worth noting that after you manage to add libC ++. dylib may have encountered build errors. In this case, the fix that I used is to go to the settings of your target assembly and change the Enable Bitcode option to None.

+1
source share

All Articles