win8+vs2013编译CLapack

Cmake生成vc12的工程

生成allbiuld没问题

生成INSTALL出错,error MSB3073: 命令“setlocal........

可以用管理员身份启动vs2013,再生成就好了。

生成run_tests,只通过了前13个,后面全failed

管他呢,能用就行


注意:CLapack和opencv有冲突!!!

如果一个cpp中同时包含以下头文件:



#include "f2c.h"
#include "clapack.h"

#include <cv.h>
#include <highgui.h>


编译会有以下错误:

1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2027: 使用了未定义类型“_Ty”
1>          h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(249) : 参见“_Ty”的声明
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2226: 语法错误 : 意外的“std::complex<_Other>”类型
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2988: 不可识别的模板声明/定义
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2059: 语法错误:“-”
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2065: “_Ty”: 未声明的标识符
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2923: “std::complex”: 对于参数“_Ty”,“_Ty”不是有效的 模板 类型变量
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(250): error C2059: 语法错误:“)”
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(263): error C2065: “_Ty”: 未声明的标识符
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(263): error C2923: “std::complex”: 对于参数“_Ty”,“_Ty”不是有效的 模板 类型变量
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(264): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>h:\program files (x86)\microsoft visual studio 12.0\vc\include\xcomplex(264): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)


这是因为f2c.h中定义了一个函数

#define abs(x) ((x) >= 0 ? (x) : -(x))

可以注释掉这一句,前提是如果不用的话

你可能感兴趣的:(win8+vs2013编译CLapack)