Yep -- you need to declare static data in the CPP otherwise gcc doesn't
know which .o to put it in.
On May 21, 2013 10:36 AM, "Owen Williams" <notifications@github.com> wrote:

> In mixxx/src/playermanager.h:
>
> > @@ -84,6 +84,29 @@ class PlayerManager : public QObject {
> >          return QString("[PreviewDeck%1]").arg(i+1);
> >      }
> >
> > +    // Returns a list of lists of possible orders to load tracks into decks.
> > +    // Controllers label their channels differently and these are the three combinations
> > +    // we've encountered.
> > +    const QList<QList<int> > getAvailableDeckOrderings() {
>
> when I make this static, I also have to make m_deck_orderings static, and
> then I get linker errors:
>
> lin64_build/playermanager.o: In function QListData::size() const':
> /usr/include/qt4/QtCore/qlist.h:98: undefined reference to
> PlayerManager::ms_deck_orderings'
> lin64_build/playermanager.o: In function QList<QList<int>
> >::push_back(QList<int> const&)':
> /usr/include/qt4/QtCore/qlist.h:296: undefined reference to
> PlayerManager::ms_deck_orderings'
> /usr/include/qt4/QtCore/qlist.h:296: undefined reference to
> PlayerManager::ms_deck_orderings'
> /usr/include/qt4/QtCore/qlist.h:296: undefined reference to
> PlayerManager::ms_deck_orderings'
> lin64_build/playermanager.o: In function
> QList<int>::free(QListData::Data*)':
> /usr/include/qt4/QtCore/qlist.h:759: undefined reference to
> PlayerManager::ms_deck_orderings'
> lin64_build/playermanager.o:/usr/include/qt4/QtCore/qlist.h:98: more
> undefined references to `PlayerManager::ms_deck_orderings' follow
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mixxxdj/mixxx/pull/6/files#r4322092>
> .
>