Ios.staticlibrary.1-avoid-duplicate-symbol-in-static-library[draft]

Source: Internet
Author: User

Avoid Duplicate symbol in the static library and its customer

Publish the static library for use by the user. In practical engineering practice, iOS static libraries typically appear when the SDK is available externally/internally.

The static library (SDK) itself may depend on some third-party libraries, and the problem comes when apps that use the SDK also rely on the same third-party libraries.

FIGURE:SDK and SDK Customer relies on the same 3rd library

1. How the static library avoids duplicate symbols for the user's code

REF[1] Ref[4]

2. Extract the object file from the static library in iOS

REF[5]

1 $ lipo Libxxxsdk.a-thin armv7-output libxxxsdk-armv7.a2ar -x libxxxsdk-armv7.a

3. Publish a static library3.1 Publishing a static library that supports emulators and real machines

REF[6] Ref[7]

3.2 Debug compile and release compile static library differences

A:nslog

Debug:nslog will output

Release:nslog does not output

3.3 How to strip a static library symbol table

A) Hide symbols for static libraries

REF[17]

"Hiding internal names requires a few simple Xcode build settings, and it's not generally

necessary to modify source or change the type of the built product.

1. Eliminate any internal symbols required between modules by performing a single-object prelink.

Set the Xcode build setting named "Perform single-object PreLink" to Yes (generate_master_object_file=yes).

This causes ld to is run with the "-r" flag.

2. Make sure and the setting "Strip Style" is set to "Non-global symbols" (strip_style=non-global), this passes "-X" to LD.

Stripping is only actually performed on static libraries if post-processing are enabled (and this is not the default).

3. Set Xcode Build Setting "Deployment postprocessing" to Yes. (deployment_postprocessing=yes).

Also Make sure the ' use separate strip ' is set to Yes (not always the default).

4. If, in addition-to-local symbols, if you need to remove some of the global symbols you can supply additional

Options to the Strip command, under the Xcode build setting "Additional Strip Flags". e.g. I commonly

Use the Strip "-R somefile" option to provide a file with an additional list of symbols which I want removed

From the global symbol table. REF[17]

About "Strip_sytle" reference ref[19]

B) After culling the symbol table of the static library, this happens: The address cannot be symbolized when the static library appears crash. REF[18]

C) If the symbol of the static library is strip off, will it be like the app is generated. dsym file? Or something like that?

3.4 Automatically build a static library of multiple architecture

REF[15]

3.5 When publishing a commercial static library, choose Debug Configuration or Release configuration?

REF[16]

Reference

1. Avoiding dependency collisions in IOS Static library managed by CocoaPods (aaaa+)

HTTP/blog.sigmapoint.pl/avoiding-dependency-collisions-in-ios-static-library-managed-by-cocoapods/

2. Using Static Libraries in IOS

Https://developer.apple.com/library/ios/technotes/iOSStaticLibraries/Articles/creating.html

3. UNIX ar examples:how to Create, View, Extract, Modify C Archive Files (*.A)

http://www.thegeekstuff.com/2010/08/ar-command-examples/

4. Avoiding duplicate symbol errors during linking by removing classes from static libraries (Toread)

Http://atnan.com/blog/2012/01/12/avoiding-duplicate-symbol-errors-during-linking-by-removing-classes-from-static-libraries

5. Extract object (*.O) files from an iPhone static library

6. How to build a library for both IPhone simulator and device?

7. Build Fat Static library (device + simulator) using Xcode and SDK 4+

8. Distributing your Static Library

Http://www.akitaonrails.com/2011/04/24/objective-c-distributing-your-static-library#.VZY4ShOqqko

9. Xcode 6 drops armv7s

Https://www. cocoanetics.com/2014/10/xcode-6-drops-armv7s/

IOS Static Libraries is, like, really bad, and Stuff (toread)

Http://landonf.org/code/ios/Radar_15800975_iOS_Frameworks.20140112.html

Strip Debug symbol from Universal static libraries (tested for IOS only)

https://gist.github.com/neonichu/1662881

A XCode project template to build universal frameworks (ARM7, arm7s, and simulator) for Ios/iphone.

Https://github.com/kstenerud/iOS-Universal-Framework

Http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial (aaaa+)

Strip Nmeidt Symbols: tools for editing symbols

Https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/symbols.1.html

Automatic build of Static library for IOS and many architectures (aaaa+)

http://blog.sigmapoint.pl/automatic-build-of-static-library-for-ios-for-many-architectures/

How to distribute Static libraries?

http://stackoverflow.com/questions/5730432/how-to-distribute-static-libraries/5778007#5778007

"So, the long story short:just distribute a fat, release version of the Your library!"

Strip symbol in Static library

17.1 Symbol hiding in static libraries built with XCODE/GCC

17.2 symbolification:shipping Symbols

http://bdunagan.com/2010/05/15/symbolification-shipping-symbols/

17.3 How to solve symbolication problems--"Build settings for getting proper symbol data"

Http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/how-to-solve-symbolication-problems

17.4 Xcode build settings for debug symbol

Http://jonathanblog2000.blogspot.tw/2013/07/xcode-build-settings-for-debug-symbol.html

Symbolicating crash log for app with Static library

. Xcode Build Setting Reference

Https://developer.apple.com/library/ios/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_ Setting_reference/build_setting_ref.html

Https://developer.apple.com/library/mac/technotes/tn2004/tn2123.html#SECNOSYMBOLS

Ios.staticlibrary.1-avoid-duplicate-symbol-in-static-library[draft]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.