使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误
"Conversion to non-scalar type is requested" error on linux terminal using cmake
当我尝试使用CMake生成CodeLite时,遇到了一个问题。我在"make-j4"步骤中遇到了它。它显示"请求转换为非标量类型"。
'''
[ 68%] Built target codelitephp
[ 68%] Built target codelite-make
[ 69%] Built target codelite-terminal
[ 83%] Built target wxCrafter
[ 83%] [ 83%] [ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilerMainPage.cpp.o
Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlgBase.cpp.o
Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlg.cpp.o
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlg_liteeditor_bitmaps.cpp.o
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersModifiedDlg.cpp.o
/home/osboxes/Desktop/codelite-13.0/LiteEditor/CompilerMainPage.cpp: In member function ‘void CompilerMainPage::InitializeTools()’:
/home/osboxes/Desktop/codelite-13.0/LiteEditor/CompilerMainPage.cpp:543:76: error: conversion from ‘wxPGIterator<wxPGProperty,wxPropertyGridPageState>’ to non-scalar type ‘wxPGIterator<const wxPGProperty,const wxPropertyGridPageState>’ requested
wxPropertyGridConstIterator iter = m_pgMgrTools->GetGrid()->GetIterator();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/ConfigManagerBaseDlg.cpp.o
make[2]: *** [LiteEditor/CMakeFiles/codelite.dir/CompilerMainPage.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [LiteEditor/CMakeFiles/codelite.dir/all] Error 2
make: *** [all] Error 2
''
有人能帮我解决这个问题吗?我关注了这个GitHub链接。"cmake"步骤似乎有问题。如果有人能帮我解决问题,我将不胜感激!
这个问题似乎与CMAKE无关,而与实际编译无关
我个人不了解图书馆,但据我所知,从你分享的维基页面来看,这些说明可能已经过时了,因为它的日期是2018年,但图书馆最近有变化。
我会检查依赖关系版本,看看它们是否与维护人员在README.md 中指定的版本匹配
我在CentOS 7.6克隆操作系统上编译CodeLite 13时遇到了类似的问题。通过替换CompilerMainPage.cpp文件第543行的以下代码字符串,设法解决了这个问题,位于";LiteEditor;子文件夹:
wxPropertyGridConstIterator iter = m_pgMgrTools->GetGrid()->GetIterator();
通过以下代码声明:
const wxPropertyGrid* pgrid = m_pgMgrTools->GetGrid();
wxPropertyGridConstIterator iter = pgrid->GetIterator();
保存该文件并重复编译。在我的案例中,问题已经解决,我现在可以在我的开发项目中使用CodeLite 13(不幸的是,CodeLite不能以rpm格式用于CentOS 7.x(
相关文章:
- 使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误
- 如何修复 eigen3 中的'non-type template argument is not a constant expression'?
- 为什么这段代码抱怨"a non-type template parameter cannot have type"?
- 如何修复张量流中的"Non-OK-status: Not found: Op type not registered 'NoOp' in binary running"
- "conversion from void to non scalar type string"是什么意思?
- "base operand of ‘->’ has non-pointer type" 但它是指针
- 我收到一个" conversion from ‘std::string (*)[50]’ to non-scalar type ‘std::string’ requested"错误,似乎无法修复它
- 如何修复空虚拟方法的"warning: no return statement in function returning non-void [-Wreturn-type]"
- C++ 错误"Braces around scalar initializer for type int*"
- std::variant、包装类和'conversion from ... to non-scalar type ... requested'
- C++编译器错误"cannot be thread-local because it has non-POD type""
- 使用带有对象的数组调用类中的方法,错误"non-class type",c++
- "enumeral and non-enumeral type in conditional expression"背后的推理
- "invalid initialization of non-const reference of type..." 克隆() 函数错误
- C++:离奇发生的"Request for member X of Y which is of non-class type Z"
- 使用 cvQueryFrame 时出现"conversion from ‘IplImage* {aka _IplImage*}’ to non-scalar type ‘cv::Mat’ reque
- constexpr with std::array - "Non-type template argument is not a constant expression"
- 为什么称为"non-type"模板参数?
- 具有Non-type template Parameter成员函数的template类
- "error: conversion from 'int' to non-scalar type 'COORD' requested"