請問一下為什麼我在
class CirGate
{
public:
CirGate(unsigned g):_ref(_gRef),_gateId(g){}
virtual ~CirGate() {}
...
static unsigned _gRef;
static void gpp(){++_gRef;}
private:
protected:
unsigned _ref;
...
};
class AigGate : public CirGate{
public:
AigGate(unsigned g):CirGate(g),_fanout(0){
_ref=_gRef; ...}
private:
...
};
compile的時候一直出現呢 Q_Q
/home/sillyduck/Ubuntu One/DSnP/hw6/src/cir/cirGate.h:27: undefined reference
to `CirGate::_gRef'
../../lib/libcir.a(cirMgr.o): In function `AigGate':
/home/sillyduck/Ubuntu One/DSnP/hw6/src/cir/cirGate.h:59: undefined reference
to `CirGate::_gRef'
我把code全部複製到新的123.cpp再compile就可以過 =.=|||
順便問一下 cirp -fl 的順序不太一樣這OK嗎
ref的順序是用dfs的順序還是照大小排序的順序阿?