2012-11-23 44 views
1

我想編寫適用於iPhone和Android的通用代碼。爲此,我想使用的Android做工精細捲曲庫,但適用於iOS它給了我以下錯誤:使用cURL庫

(null): "_curl_easy_cleanup", referenced from: 
(null): "_curl_easy_init", referenced from: 
(null): "_curl_easy_perform", referenced from: 
(null): "_curl_easy_setopt", referenced from: 
(null): "_curl_easy_strerror", referenced from: 
(null): Linker command failed with exit code 1 (use -v to see invocation) 

上面的錯誤指示libcurl.a一些鏈接錯誤。我無法找到合適的解決方案。請幫忙。

回答

2

您是否已將libcurl.a添加到您在XCode中的應用程序編譯的鏈接過程中?如果這是GCC,它將通過添加一個像-lcurl這樣的標誌,但我不太確定XCode。

試試這個:
XCode -> Click on your project -> Your Target -> Build Settings -> Linking -> other Linker flags - 在這裏添加-lcurl
到庫的路徑可能需要在Build Settings -> Search paths -> Library Search Paths

+0

您好以復加,我在上面,但仍試圖有同樣的問題。 –

+0

如果庫正確編譯/下載,安裝在正確的位置,包含在Xcode中的路徑和添加的鏈接選項,那麼我就不會有想法了,對不起 –

+0

你能解釋一下嗎從頭開始? (一步一步的),並提供我鏈接下載庫。 –