Error When Import Zlib in iOS: Symbol(S) Not Found Collect2: Ld

error when import zlib in iOS: symbol(s) not found collect2: ld

In your Target's Build Settings tab, scroll down to the Other Linker Flags section and make sure -lz is in the field. This will link against the built-in zlib, and your error should go away.

After changing the Linker Flags you must select Clean from the Product menu before building again.

lz screenshot

ziparchive Objective-C arc compatible

For the undefined symbols, you need to add libz to the linked libraries. See: error when import zlib in iphone sdk

How to use bzip2 format in iOS? Apple tell me bzBuffToBuffDecompress is private APIs

Since the license of bzip2 is compatible (read it, please) you can statically link against bzip2 instead of dynamically. A bit of searching lead to iOS-libarchive that will help you do that.

Apple Mach-O Linker Error, due to file extension

Wrap your Freetype includes within an extern "C" directive:

// Non-C includes
#include <iostream>

extern "C"
{
#include <freetype/freetype.h>
// ... Other freetype includes
}

You can probably use #import instead of #include within an extern "C" directive. I've never tried, but I don't see why it wouldn't work.

Setting up lib haru in an iPhone project for pdf creation

I've just installed it in XCode 4:

  • In the iPhonePDF's folder downloaded from http://github.com/akisute/iPhonePDF you have a support folder with the libharu and the libpng folders inside. The trick here is the files you copy to your project. Delete the script files and, specially, the file named pngtest.c from the libpng folder.

  • Once you have the folders "clean", you can add them to your project and it will compile.

‘ld: warning: directory not found for option’

You need to do this:

  1. Click on your project (targets)
  2. Click on Build Settings
  • if your error includes the -L flag, then delete the values in Library Search Paths
  • if your error includes the -F flag, then delete the values in Framework Search Paths

And regarding the second error, sorry i can't help you out with that one. Hope someone else can help you out.



Related Topics



Leave a reply



Submit