Vulkan

error LNK2001: 无法解析的外部符号 "public: static class std::vector<class......

vector类型作为class的static成员,需要在class外 define。
如:
class MyClass {
private:
    static std::vector<float> myObjectCache;
public:
    static void UpdateCache ();
};
需要在类外
std::vector<float> MyClass::myObjectCache;

当然其他的数据类型同样如此。

posted on 2012-09-18 09:54  Vulkan  阅读(1526)  评论(0编辑  收藏  举报

导航