Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译错误 #3

Open
RoseInTheHand opened this issue Nov 19, 2020 · 8 comments
Open

编译错误 #3

RoseInTheHand opened this issue Nov 19, 2020 · 8 comments

Comments

@RoseInTheHand
Copy link

std::max 未找到匹配的重载函数

@busyboxs
Copy link
Owner

std::max 未找到匹配的重载函数

https://en.cppreference.com/w/cpp/algorithm/max
看一下这个,可能没有添加 algorithm 头文件。如果是在 windows 平台的话,也可以直接使用宏 max,把 std:: 去掉。
另外也可以试试吧 std::max() 的参数类型显示转换为一致试试。

@busyboxs
Copy link
Owner

再不行就用 if..else..吧

@RoseInTheHand
Copy link
Author

第一种方法我试过了,在windows平台有问题,不过注释了之后可运行,我用if else 试下

@RoseInTheHand
Copy link
Author

嗯嗯,还是用if else,谢谢大佬

@RoseInTheHand
Copy link
Author

大佬你这字体怎么和opencv自带的不太一样啊

@busyboxs
Copy link
Owner

大佬你这字体怎么和opencv自带的不太一样啊

字体可以指定,windows自带的那些字体应该都能用,你得把字体文件放进font目录

@RoseInTheHand
Copy link
Author

这个我知道,但是显示的时候就是有点奇怪,我想让字体没有那么多效果,效果太多了,正常显示就行,改了参数,不太理想

@njuFerret
Copy link

模板类型不匹配,改一下类型
m_maxDiffHeight = std::max(m_maxDiffHeight, rows - (slot->metrics.vertBearingY >> 6));
=> m_maxDiffHeight = std::max(m_maxDiffHeight, (long)(rows - (slot->metrics.vertBearingY >> 6)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants