Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alexbates

macrumors 65816
Original poster
Nov 24, 2008
1,082
0
Georgia, USA
I finally finished coding an iPhone web browser but have gotten this error in Xcode in two different places. And the code the errors are referring to are....

Code:
#import "Basic_BrowseAppDelegate.h"
#import "Basic_BrowseViewController.h"

I don't think there is supposed to be a semicolon there buy I may be wrong.

Any ideas? (screenshots of errors are attached)

Thanks to all help! And sorry if this has already been asked or its a stupid question... I'm new to programming.
 

Attachments

  • Picture 2.png
    Picture 2.png
    33.1 KB · Views: 166
  • Picture 3.png
    Picture 3.png
    8.7 KB · Views: 4,773

lucasgladding

macrumors 6502
Feb 16, 2007
319
1
Waterloo, Ontario
You'll get used to these errors in the future. The problems are within your header files but are getting flagged during import in the implementation files. You may be able to spot the problem if you focus your attention there. If you have trouble finding the error, please post the source from those headers and someone should be able to help.

Hint: check your method declarations in the header for trailing semicolons.

Kind regards

Luke

BTW: you're correct - there is no semicolon after the import command
 

alexbates

macrumors 65816
Original poster
Nov 24, 2008
1,082
0
Georgia, USA
You'll get used to these errors in the future. The problems are within your header files but are getting flagged during import in the implementation files. You may be able to spot the problem if you focus your attention there. If you have trouble finding the error, please post the source from those headers and someone should be able to help.

Hint: check your method declarations in the header for trailing semicolons.

Kind regards

Luke

BTW: you're correct - there is no semicolon after the import command

Thanks for your reply. I think I have figured out the error. I was missing the semicolon after...

Code:
-(IBAction) gotoAddress:(id)sender[B][U];[/U][/B]

in the ViewController.h file before...

Code:
@end

It will now build and go successfully...hooray!

Thanks again,
Alex
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
Just a general note, when you get errors near the beginning of a file, after you've checked what it's telling you, start looking for missing semicolons and missing or mis-matched braces. A lot of times the compiler will get really confused in these cases and the real error may be far away from where it's telling you it is, and the error it's reporting might not be the real problem either.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.