views:

347

answers:

3

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

I am developing an app that uses the routeMe library to display maps. I'm testing things in the simulator and everything works great. The app also uses the GPS features on the iPhone so I decide to plug it into the device and take it for a stroll to see what kind of data it produces.

The compiler complains that it can't find a routeMe library located in my simulator build directory, so I figure that I must have jugged adding routeMe somehow. I remove routeMe and go through all the steps on the embedding guide to get it back up and running (I wish).

Now xCode is demanding a bunch of parentheses that are already there. For example, this line:

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

Earns the error: ...RMTiledLayerController.h:59: error: expected ')' before 'CLLocationCoordinate2D'

The line looks good to me xCode! What's the deal?

Here's a full list of all errors and warnings I get, could one of these be causing the problem? I didn't write or change in any way any of the classes the compiler is complaining about, and everything compiled fine on the simulator two hours ago. I am truly stumped.

/User

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  A: 

Two things to check,

  • are there any errors before the ones you listed? There could be a problem in the imports in RMTiledLayerController.h
  • Might sound silly, but make sure the file you are viewing is exactly the one listed

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

As a side note, there is no voddo involved in iPhone development, the development environment is built on top of gcc which is used by countless projects.

hhafez
A: 

It looks to me very much like you haven't included the CLLocation.h header file. That would explain the error message.

Also, does this file actually exist, on the harddrive: /Users/timothybowen/Documents/src/thetrailbehind/TrailTracker/lib/routeMe/MapView/build/Debug-iphonesimulator/libMapView.a

If not, it won't link. Check carefully how you've added the reference to the library. Also, chances are that the error is preventing the library from being built; that would explain it not being on disk.

In the file with the error, apple double-click on the types in the selector to see their definitions. I suspect it will complain, or display a headerfile that isn't included.

Dave Gamble
A: 

libMapView.a is a target of my project so it needs to get compiled at run time and installed on the phone, I don't know why it's looking to the simulator debug build of the library for all distributions.

I fixed this error by wiping out the library and checking out a fresh copy. I lost some of my work but at least my app compiles now.

Objectively I know there's no voodoo involved but it sure seems that way when a library that has compiled fine for weeks suddenly blows up on you.

Tim Bowen