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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:09:32+00:00 2026-06-05T23:09:32+00:00

I have a class called Metadata, which is declared within the namespace A::B::C ,

  • 0

I have a class called Metadata, which is declared within the namespace A::B::C, which also contains the struct copyInfo, which holds the info about a metadata.
So, Metadata has only its default contructor / destructor, and when I try to use a member function from Metadata called
importMetadata(vector<copyInfo> &info, const string &src, const string &dst, const int &job:

I’m getting the following error:

import_helper.cpp:(.text+0x246): undefined reference to
A::B::C::Metadata::importMetadata(std::vector<A::B::C::copyInfo, std::allocator<A::B::C::copyInfo> >&, 
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, 
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)
namespace A{
  namespace B{
    namespace C{
        class Metadata{
              Metadata();
              ~Metadata();
             importMetadata(vector<copyInfo> &seq, const string &src, 
                 const string &dst, const int &job);
             /* more code down here */
        };
      }
     }
    }

Now, in Metadata I have:

That function is being called from a wrapper c++ function called wrapperMetadataImport, which belongs to import_helper.cpp.

#include "Metadata.h"
using namespace A::B::C;

int wrapperMetadataImport(const char * src, const char * dest, const int * jobid){
        Metadata mtd;
        string src = srcName;
        string dest = destName;

        vector<copyInfo> sequence;

        /* add elemens to the vector sequence */

        if((ret = mtd.importMetadata(sequence,
                        src, dest, *jobid)) == EC_success){

        /* more code down here */

I have no clue why I’m getting that. I have checked the .h and .cpp file, everything sounds ok to me. I suppose it’s a runtime linking problem. The namespacing should be as is: A::B::C. Any thoughts?

  • 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-06-05T23:09:34+00:00Added an answer on June 5, 2026 at 11:09 pm

    This is a linker error, and indicates that the implementation of the function can’t be found. Either you haven’t written the function, or you haven’t included the source file containing it in your build.

    You have declared it in the class definition, but without a full definition the function can’t be called.

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

Sidebar

Related Questions

I have a class called Path for which there are defined about 10 methods,
I have a class called UserInfo that contains details about a given user. There
I have a class called ModelView which inherits from NSOpenGLView. When my program runs
I have a class called MainGame, which is defined like this in my .h:
I have a class, Autodrop, that contains several methods , a.o. 'metadata', that call
I have a class called dataList. It is basically a list with some metadata---myDataList.data
I have class called ItemList, which is used to provide a list of suggested
I have a class called BaseB which can be called from A . I
Java Code In Java code I have class called IdentificationResult which has 3 members:
I have class called HelloWorld.m and another class called Person.m. I have declared Person

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.