2009-07-13 26 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是我的项目的一个目标,所以它需要在运行时编译并安装在手机上,我不知道为什么它需要为所有发行版的库的模拟器调试构建。

我通过清除库并检出新副本来解决了此错误。我失去了一些工作,但至少我的应用程序现在编译。

客观地说,我知道这里没有涉及伏都教的情况,但是看起来好像这样,当一个编译好几周的图书馆突然爆炸了。