• Advertisement
Sign in to follow this  

undefined symbol

This topic is 657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

why do I get:

undefined symbol: _ZN9AusfaelleC1Eii

with this header:

 

/*
 * myList.h
 *
 *  Created on: Jul 3, 2016
 *      Author: michael
 */

#ifndef MYLIST_H_
#define MYLIST_H_


class Ausfaelle {
public:
    int active, color;
    Ausfaelle(int active, int color);   
};

int mListe ();

#endif /* MYLIST_H_ */

 

 

and in main.cpp:

 

int mListe ()
{
    std::list<Ausfaelle> points;

    points.push_back(Ausfaelle(1,1));

    std::list<Ausfaelle>::iterator iter;

    for(iter = points.begin(); iter != points.end(); ++iter)
    {
        Ausfaelle test = *iter;
        std::string s = std::to_string(test.active);
        char const *pchar = s.c_str();
        XPLMDebugString(pchar);
    }

  return 0;
}

 

Many thanks

 

Share this post


Link to post
Share on other sites
Advertisement

I'm assuming he doesn't have a 'definition' which is the cause of the error. 

 

class Ausfaelle 
{
public:
    int active, color;
    Ausfaelle(int _active, int _color) : active(_active), color(_color) 
    {
    }
};

Share this post


Link to post
Share on other sites

Thanks, forgot this.

 

Ausfaelle::Ausfaelle(int a, int b) {
    active = a;
    color = b;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement