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 938241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:36:40+00:00 2026-05-15T21:36:40+00:00

My Question is similar to This SO question , but with the main difference

  • 0

My Question is similar to This SO question, but with the main difference being that I’m using class methods. Some code:

OpenFeint+private.h

@interface OpenFeint (Private)
// ...
+ (void) createSharedInstance;

OpenFeint+private.mm

+ (void) createSharedInstance
{
   //...
}

OpenFeint.mm

+ (void) initializeWithProductKey:(NSString*)productKey 
       andSecret:(NSString*)productSecret 
       andDisplayName:(NSString*)displayName
       andSettings:(NSDictionary*)settings 
       andDelegates:(OFDelegatesContainer*)delegatesContainer
{
    [OpenFeint createSharedInstance];
    // ...

MyApp.mm:

// ...
#import "OpenFeint.h"
// ...
[OpenFeint initializeWithProductKey: OF_PRODUCT_KEY 
        andSecret: OF_PRODUCT_SECRET
        andDisplayName: OF_DISPLAY_NAME
        andSettings: openFeintSettings
        andDelegates: [OFDelegatesContainer containerWithOpenFeintDelegate: self]];

And the error is:

2010-07-22 11:30:15.239 MyApp[20210:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[OpenFeint createSharedInstance]: unrecognized selector sent to class 0x1cdb1c'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x02d6f919 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x02ebd5de objc_exception_throw + 47
    2   CoreFoundation                      0x02d714eb +[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x02ce1116 ___forwarding___ + 966
    4   CoreFoundation                      0x02ce0cd2 _CF_forwarding_prep_0 + 50
    5   MyApp                               0x0002844d +[OpenFeint initializeWithProductKey:andSecret:andDisplayName:andSettings:andDelegates:] + 48
        // ...

Everything compiles & links just fine, but I’m getting this goofy error.

One last thing — All the OpenFeint stuff is is a static library and, yes, it compiled & linked as well. This is my first static library so I’m likely just missing some important step. Any clues?

Thanks!

  • 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-15T21:36:40+00:00Added an answer on May 15, 2026 at 9:36 pm

    Hmmm, I seem to have found a workaround, but I’m not sure if it’s a correct fix. I added the linker flag -all_load (in addition to -ObjC), and all seems to work, now.

    Question revision/addition: is this a “legit” fix? Is there a better one?

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

Sidebar

Related Questions

I asked a similar question about this previously, but I did not specify that
I know this is similar to this question , but I'm using SQL Server
This question is about a whole class of similar problems, but I'll ask it
Well this question and this question are similar but no answers that work. In
Similar question as this one but for a Microsoft Environment. Email --> Exchange Server
Similar to this question but for MySQL.... How can I programmatically determine foreign key
Similar to this question, but for VB.NET since I learned this is a language
This is similar to this question , but I want to include the path
I suppose this might be similar to this question , but I'm wondering if
This is similar to a previous question , but the answers there don't satisfy

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.