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

  • SEARCH
  • Home
  • 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 6782283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:43:23+00:00 2026-05-26T16:43:23+00:00

I am new to Objective-C and a bit rusty at using C++ and templates,

  • 0

I am new to Objective-C and a bit rusty at using C++ and templates, and I am not sure why I am having this link error.

I have a header file that contains definitions similar to these:

struct Info {
  std::string name;
};

typedef std::map<std::string, Info> InfoMap;

void Validate(InfoMap* infoMap);

@interface InfoValidator : NSObject 
{ 
}
+(InfoValidator*) getInstance;
-(void) validate:(InfoMap*)infoMap;
@end

I also have an .mm file that contains the following definition for the (global) Validate() method:

void Validate(InfoMap* infoMap)
{
    [[InfoValidator getInstance] validate:infoMap];
}

When I call Validate() from a C++ class (defined in an .mm file), I receive the following error:

Undefined symbols for architecture armv7:   
Validate(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Info, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, > std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, ?> std::allocator<char> > const, Info> > >*)", 
referenced from:
      ItemInterface::ValidateItems(int, char const**)in iteminterface.o 
ld: symbol(s) not found for architecture armv7 
collect2: ld returned 1 exit status

The file has been added to the project, and it is the only link error I get. Thanks for any help.

  • 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-26T16:43:23+00:00Added an answer on May 26, 2026 at 4:43 pm

    Did you rename Market_Validate to Validate for the code you’ve quoted here? The link error refers to the former, which doesn’t exist in the code given.

    If so, the code looks correct in isolation, I suspect there’s something outside the code you’ve shown going wrong. Make sure both .mm files are in fact being compiled and linked. Check that both include the same header file with your Validate() function declaration. Since you have renamed the function before posting it here, make sure you’re using the same name for it throughout your code (specifically, the declaration and definition must match exactly).

    Are you using namespaces anywhere? Make sure you didn’t accidentally put your function definition inside a namespace if the declaration isn’t – they’ll be referring to different functions.

    Note that the code as you’ve posted it won’t compile, as there’s a semicolon missing after your struct Info definition. It’s often impossible to help once the code has been altered for the question without testing that the problem still exists with that code. If you’re still stuck, I suggest trying to amend the code in this question so it will compile and show the same link error. If you can’t reproduce it, take a good look at the differences between your ‘real’ code and the question code.

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

Sidebar

Related Questions

I am new to Objective-C and I have no clue why this code is
I am lil bit new to objective C. Here is my requirement. I have
I'm new to Objective-C and have a little bit of problem. I made an
Still new to Objective C, and I'm having some trouble that I just can't
I'm new with Objective-C, so there probably is a simple solution to this. I
I am new to Objective C and iPhone development. I am using CoreData on
Objective: I have a list of header files (about 50 of them), And each
I'm a bit new to objective-c and even newer at programming with Quartz 2D,
I am trying to write a bit of Objective-C (which is new for me,
I am new to Objective-C and iPhone development in general. I am using the

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.