用当前最新版vs2019编译opencv最新版4.3.0遇到的问题---
用当前最新版vs2019编译opencv最新版4.3.0遇到的问题---
1. cvv库中报错
大意是下面函数中的符号三个点含有换行符;
QString shortenString(QString &str, int maxLength, bool cutEnd, bool fill)
{
if (str.size() > maxLength)
{
if (cutEnd)
{
str = str.mid(0, maxLength - 1) + u8"…";
}
else
{
str = u8"…" +
str.mid(str.size() + 1 - maxLength, str.size());
}
}
else if (fill)
{
str = str + QString(maxLength - str.size(), ' ');
}
return str;
}
这个符号不是三个点,而是一个符号,显示为三个点;
我试了很多办法都没有搞定这个报错,直到最后将这个文档从(这里我已经改过了)
修改为 utf-8 with bom ;
然后问题解决;
2. 第二个错误是找不到cuda头文件中的很多符号的定义;
原错误这里已经没有了;
分析:
由于我的环境安装了cuda8,cuda10.1;
而且还是后装的cuda8.0,导致cmake找到的cuda就是8.0;
然后就出现了了这些错误;
解决方法:
1.检查cmake中的cuda的路径;
所有的cuda路径都要一致;
2.所有路径改为cuda10.1之下的路径;
另外也要注意其他的库比如qt库的路径,32位还是64位的要搞清楚;
另外,应当注意,cuda库如果要做开发的话,如果是32位的那么最高只能支持到vs2013;
还有一个其它的什么库32位开发,最高只能支持到vs2015,忘记名字了;
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采