2009-07-13 46 views
1

與iPhone開發有關的伏都教永遠不會令我驚歎。這裏是最新的十六進制文件,已經傳遞給我。xCode要求已經存在的符號

我正在開發一個使用routeMe庫來顯示地圖的應用程序。我正在測試模擬器中的東西,一切都很好。該應用程序還使用iPhone上的GPS功能,因此我決定將其插入設備中並漫步以查看它產生的數據類型。

編譯器抱怨說它無法找到位於我的模擬器構建目錄中的routeMe庫,所以我認爲我必須以某種方式加入routeMe。我刪除routeMe,並通過嵌入指南中的所有步驟來恢復並運行(我希望)。

現在xCode正在要求一堆已經存在的圓括號。例如,該行:

-(void) centerLatLong: (CLLocationCoordinate2D) point animate: (BOOL) animate; 

賺取錯誤:... RMTiledLayerController.h:59:錯誤:預期 ')' 前 'CLLocationCoordinate2D'

行對我來說很好的Xcode!這是怎麼回事?

下面是我得到的所有錯誤和警告的完整列表,其中一個會導致問題嗎?我沒有以任何方式編寫或更改編譯器所抱怨的任何類,並且兩小時前模擬器上的所有編譯都很好。我真的很難過。

/用戶

s/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/Map/RMTiledLayerController.h:59: error: expected ')' before 'CLLocationCoordinate2D' 

/Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/Map/RMTiledLayerController.m:46: warning: no '-tileProjection' method found 

/Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/Map/RMTiledLayerController.m:108: error: expected ')' before 'CLLocationCoordinate2D' 

/Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/Map/RMTiledLayerController.m:110: error: 'RMMercator' undeclared (first use in this function) 

/Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/Map/RMTiledLayerController.m:110: warning: 'RMTiledLayerController' may not respond to '-centerMercator:animate:' 

i686-apple-darwin9-gcc-4.2.1: /Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/build/Debug-iphonesimulator/libMapView.a: No such file or directory 
i686-apple-darwin9-gcc-4.2.1: /Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/build/Debug-iphonesimulator/libMapView.a: No such file or directory 

回答

1

兩件事情來檢查,

  • 是那裏的人,然後列出任何錯誤?有可能是在進口的問題RMTiledLayerController.h
  • 也許聽起來很傻,但要確保你正在瀏覽的文件正是一個上市

The voodoo involved in iPhone development never ceases to amaze me. Here's the latest hex that has been cast upon me.

作爲一個側面說明,沒有參與voddo iPhone開發,開發環境建立在無數項目所使用的gcc之上。

0

它看起來非常像你沒有包含CLLocation.h頭文件。 這將解釋錯誤消息。

此外,沒有這個文件實際存在,對硬盤: /Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/build/Debug-iphonesimulator/libMapView.a

如果不,它不會鏈接。仔細檢查你是如何添加對庫的參考。 此外,錯誤可能會阻止構建庫;這將解釋它不在磁盤上。

在出現錯誤的文件中,雙擊選擇器中的類型以查看它們的定義。我懷疑它會抱怨,或者顯示一個不包含的頭文件。

0

libMapView.a是我的項目的一個目標,所以它需要在運行時編譯並安裝在手機上,我不知道爲什麼它需要爲所有發行版的庫的模擬器調試構建。

我通過清除庫並檢出新副本來解決了此錯誤。我失去了一些工作,但至少我的應用程序現在編譯。

客觀地說,我知道這裏沒有涉及伏都教的情況,但是看起來好像這樣,當一個編譯好幾周的圖書館突然爆炸了。

相關問題