对于类中的静态成员变量,必须在类之外的某处实际定义一下,否则编译时将会“undefined reference to static class member”。
http://stackoverflow.com/questions/272900/undefined-reference-to-static-class-member
亮点:
|
You need to actually define the static member somewhere (after the class definition). Try this: class Foo { /* ... */ };
const int Foo::MEMBER;
int main() { /* ... */ } That should get rid of the undefined reference.
|
HxLauncher: Launch Android applications by voice commands