Jump to content
  • Advertisement
Sign in to follow this  
FGFS

undefined symbol

This topic is 840 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!