我试图使用Gl3n(https://bitbucket.org/dav1d/gl3n),但 我不断收到错误42,每当我试试这个:错误42时试图访问一个结构模板成员
alias Vector!(float, 2) vect2;
vect2 position;
position.x = 2.0f; //This is what causes the error
我研究了结构是如何实现的,x是一个别名为 的get/set函数,它与存储 矢量值的数组交互。我已经试过这样的事情:
alias Vector!(float, 2) vect2;
vect2 position;
position = vect2(0.0f, 0.0f);
然而,这两种方法给出了同样的错误:
Error 42: Symbol Undefined pure nothrow @property @safe void
gl3n.linalg.Vector!(float,
2).Vector.set_!('x').set_(float) C:\Users\CP\Documents\Visual
Studio 2010\Projects\D\STDS\
Error 42: Symbol Undefined
_D4gl3n6linalg16__T6VectorTfVi2Z6Vector6__initZ
我有进口这样的顶部的模块linalg:
import Gl3n.linalg; //Gl3n is the folder the source files are in
你是如何编译它的? – Trass3r 2012-03-18 19:43:51