【发布时间】:2017-01-26 08:09:09
【问题描述】:
我从 http://www.heatonresearch.com/encog/ 下载了 encog-c 源代码,并尝试按照使用 vs2015 社区的说明进行编译。
当我构建解决方案时,我收到以下错误:
Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'sizeof' encog-core C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-core\util.c 39
Error C2059 syntax error: 'sizeof' encog-core C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-core\util.c 44
还有这个链接器问题:
Severity Code Description Project File Line Suppression State
Error LNK1181 cannot open input file 'C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\Release\encog-core.lib' encog-cmd C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-cmd\LINK 1
我不明白代码中的错误(这里是代码):
#ifdef _MSC_VER
int isnan(double x)
{
return x != x;
}
int isinf(double x)
{
return !isnan(x) && isnan(x - x);
}
#endif
对于链接器错误,我找不到 encog-c-core.lib 文件,因此无法将其添加到其他链接器目录。
我做错了什么?为了编译源代码,还需要在环境中设置什么。
提前感谢您的帮助。
【问题讨论】:
-
其实我错了。我从github.com/encog 而不是heatonresearch.com/encog 下载了源代码。
标签: c++ visual-c++ neural-network encog