我試圖安裝在OS X 10.8.2 QMCPACK,我得到了很多像這樣的錯誤:
bspline_base.h:95:17: error: expected ';' at end of declaration list
void *restrict coefs;
^
;
我對restrict關鍵字不熟悉,但我覺得這可能是其他類型的問題,因爲這是一個爲其他人編寫的流行代碼。
下面是代碼的完整場境:
typedef struct
{
spline_code sp_code;
type_code t_code;
void *restrict coefs;
} Bspline;
關於限制,請參閱http://stackoverflow.com/questions/776283/what-does-the-restrict-keyword-mean-in-c。正如第一個答案指出的那樣,它不是C++語言的關鍵字(您標記的)。 –