![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++编译错误
qq_29230349
这个作者很懒,什么都没留下…
展开
-
cmake undefined symble
一般这种情况是没有连接到对应的库,也就是库目录没有找到,例如在patha/b/libmywant.so有想要的库patha/include/对应头文件在cmake中可以include_directories(patha/include/) #头文件link_directories(patha/b/)target_link_directories(target,mywant)target为要编译的目标,需要link libmywant.so库...原创 2020-05-11 15:17:30 · 1123 阅读 · 0 评论 -
comparison between signed and unsigned integer expression s [-Werror=sign-compare]
ret[i].Id 是unsigned int 型,min_index是int,不能直接比较但将min_index直接定义为unsigned 类型,-1是有符号的,在min_index == -1又是同样的错误,因此直接将比较中的-1也强制转为unsigned类型,如下图...原创 2020-02-27 14:48:50 · 3590 阅读 · 0 评论 -
C++ 编译错误 will be initialized after [-Werror=reorder]
error:根据提示找到VINSLoop::Vocabulary::Vocabulary()2.进入Vocabulary()构造函数其在构造是按照nNodes(0), nodes(nullptr), nWords(0), words(nullptr)顺序赋值的3.原声明是按照nNodes, nWords, nodes, words;顺序,如下图1,将声明顺序换位2步骤中的初始化顺序...原创 2020-02-27 14:34:12 · 9143 阅读 · 0 评论