0

I'm starting with Objective-C and I have a problem.

The compiler is giving me this error message:

Semantic Issue: Use of undeclared identifier

And this is the main.m code:

#import <UIKit/UIKit.h>

#import "HMJAppDelegate.h"

int main(int argc, char *argv[]) {
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([HMJAppDelegate class]));
    } 
}

This error is in the main.m file.

How can I fix the problem?

Jorge
  • 1
  • 1
  • check for the line... – Anoop Vaidya Apr 18 '13 at 09:56
  • Welcome to Stack Overflow! Minor remarks: "thanks" at the end of posts is considered superfluous. Also, this question is not related to Xcode. –  Apr 18 '13 at 09:57
  • First thing to do.Search the error in google .the first options will be answered SO Questions related to that – Lithu T.V Apr 18 '13 at 09:57
  • 1
    You should also take a look at this post: http://stackoverflow.com/questions/8321184/xcode-always-stopping-at-main-m-after-a-crash – xapslock Apr 18 '13 at 09:59
  • 2
    I do not understand the "duplicate candidates". "Semantic Issue: Use of undeclared identifier" is a compiler error, not a runtime crash. – Martin R Apr 18 '13 at 10:01
  • I searched the error in Google but I can't fix it. It's because I wrote in this forum. Thanks for everything. I will try to fix it following your instructions. Thanks and greetings!! – Jorge Apr 18 '13 at 10:05
  • @Jorge, doesn't the compiler indicate a line where it thinks the problem is? (compilers are getting better at this, but notice that sometimes the line they indicate is not the one that has the problem, for instance if there is a problem in an included file). Coincidentally, is the file HMJAppDelegate.h correctly coded? – Monolo Apr 18 '13 at 10:22
  • @Manolo no, I didn't code the HMJAppDelegate.h. It's necessary? And the line is this one: return UIApplicationMain(argc, argv, nil, NSStringFromClass([HMJAppDelegate class])); – Jorge Apr 19 '13 at 07:39

0 Answers0