I keep getting this error:
debug/moc_funccntrlparams.o: In function `qt_noop()':
/home/f07/xxx/QT/include/QtCore/qglobal.h:1425: multiple definition of `FuncCntrlParams::type_pairPotList'
debug/interpotcntrlparams.o:/net/home/f07/xxx/workspace/tramontoGUI/interpotcntrlparams.cpp:95: first defined here
But I'm not defining type_pairPotList any where in the interpotcntrlparams.cpp file. This is what my code looks like at line 95 in interpotcntrlparams.cpp.
#include "funccntrlparams.h"
.
.
//line 91
void InterPotCntrlParams::surfUpdate(int newSurfNum)
{
confIpot_wf_nLayout(newSurfNum);
}
The only place i ever reference type_pairPotList in interpotcntrlparams.cpp is here:
void InterPotCntrlParams::confIpot_wf_nLayout(int newNumOfSurfaces)
{
.
.
for(int i=ipot_wf_nComboVector->size(); i<newNumOfSurfaces; i++)
{
surfNumCombo->addItem(QString("Surface %1").arg(i+1));
ipot_wf_nComboVector->push_back(new QComboBox());
(ipot_wf_nComboVector->back())->addItems(FuncCntrlParams::type_pairPotList);
ipot_wf_nGrid->addWidget(ipot_wf_nComboVector->back(),0,1);
ipot_wf_nComboVector->back()->hide();
}
.
.
}
This is where I actually declare and define type_pairPotList:
//funccntrlparams.h
.
.
.
class FuncCntrlParams : public QWidget
{
Q_OBJECT
public:
/**
* Constructs a new FuncCntrlParams QWidget.
*/
FuncCntrlParams(QWidget *parent=0);
static QStringList type_pairPotList;
};
QStringList FuncCntrlParams::type_pairPotList = QStringList() << "Pair LJ12-6 CS" << "Pair Coulomb CS" << "Pair Coulomb" << "Pair Yukawa CS";
Does anyone know why I am getting this error?