Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3946344
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:07:20+00:00 2026-05-20T01:07:20+00:00

I am just starting on doing objective-c with gcc (so far I only used

  • 0

I am just starting on doing objective-c with gcc (so far I only used XCode).

#include <objc/Object.h>  
@interface Integer : Object  
{  
int integer;  
}  
- (int) integer;  
-(id) integer: (int) _integer;  
@end

#import "Integer.h"  
@implementation Integer  
- (int) integer  
{  
    return integer;  
}  
- (id) integer: (int) _integer  
{  
    integer = _integer;  
}  
@end

And once I try to compile the stuff I get this:

main.m: In function ‘main’:  
main.m:8: warning: ‘Integer’ may not respond to ‘+new’  
main.m:8: warning: (Messages without a matching method signature  
main.m:8: warning: will be assumed to return ‘id’ and accept  
main.m:8: warning: ‘...’ as arguments.)  
main.m:8: warning: ‘Integer’ may not respond to ‘+new’

Seems to me that the inclusion of Object.h did not quite work.
I searched thee includes for Object.h and got this:

find /usr/include/ -name Object.h   
/usr/include//objc/Object.h

Also the GCC output hints that the compiler is actually searching in that path.

 #include "..." search starts here:  
 #include <...> search starts here:  
 /usr/local/include  
 /usr/lib/gcc/i686-apple-darwin10/4.2.1/include  
 /usr/include  
 /System/Library/Frameworks (framework directory)  
 /Library/Frameworks (framework directory)  
End of search list.  
GNU Objective-C version 4.2.1 (Apple Inc. build 5664) (i686-apple-darwin10)
        compiled by GNU C version 4.2.1 (Apple Inc. build 5664).  
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072  
Compiler executable checksum: 84137cc00ce86c64ee80a91a006f61ae  
main.m: In function ‘main’:  
main.m:8: warning: ‘Integer’ may not respond to ‘+new’  
main.m:8: warning: (Messages without a matching method signature  
main.m:8: warning: will be assumed to return ‘id’ and accept  
main.m:8: warning: ‘...’ as arguments.)  
main.m:8: warning: ‘Integer’ may not respond to ‘+new’`\

What am I overlooking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:07:20+00:00Added an answer on May 20, 2026 at 1:07 am

    If gcc couldn’t find Object.h, it would give an error indicating that. The problem is that Apple removed most of the methods from Object (or at least the interface for it) in Objective-C 2.0. Instead, you should subclass NSObject and include the Foundation framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am only just starting out with iPhone application development and have been doing
I'm just starting with the Microsoft stack doing a web site in ASP.Net MVC
I'm just starting with ASP.Net MVC 2 and might be doing something wrong. I
I'm just starting with jQuery, and having trouble doing something embarrassingly simple: using .load()
Okay i'm just starting out on PHP & i'm doing the tutorials on the
I'm just starting Scala and so getting my head around doing things in a
I'm just starting to learn Android doing the Hello World app, and some of
Just starting out in asp.net. Have just created a login.aspx page in my site
Just starting to explore the 'wonders' of regex. Being someone who learns from trial
Im just starting a project and since this project is personal I was wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.