Tuesday, April 28, 2009

zlib.h "_deflate", referenced from:

Just added some simple zipping capability which references zlib.h but when trying to build it, there's a set of errors resolving references from the .o (object) files. This is obviously something to do with the linking to the dynamic libraries, but it's a bugger to find out what exactly and how to solve it.

The problem is that you need to alert Xcode to the fact that you want that library loaded. The easiest solution is Project>Edit Active Target, choose the General tab, and press the + button under linked libraries. This allows you to choose from the frameworks and directories appropriate to your chosen Base SDK (see the Build tab to change this).

Of course, guessing that zlib.h and libz.dylib are related is the easy part.

34 comments:

  1. 當身處逆境時,要能忍一時之氣,吃一時之苦,並及早確立自己的目標,總有一天,你會嘗到那甘美的果實。........................................

    ReplyDelete
  2. 友情像一棵樹木,要慢慢的栽培,才能成長真的友誼,要經過困難考驗,才可友誼永固........................................

    ReplyDelete
  3. 傻氣的人喜歡給心 雖然每次都被笑了卻得到了別人的心..................................................

    ReplyDelete
  4. 死亡是悲哀的,但活得不快樂更悲哀。.................................................................                           

    ReplyDelete
  5. 喜歡看大家的文章,每篇都是一個故事,都是一種心情~~祝大家開心愉快............................................................

    ReplyDelete
  6. 一時的錯誤不算什麼,錯而不改才是一生中永遠且最大的錯誤..................................................

    ReplyDelete
  7. 一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼....................................................

    ReplyDelete
  8. 花花公子的責任就是要很平均的愛他認識的每一個女孩子~~我們的責任則在於公平的回應每一篇blog..................................................................

    ReplyDelete