使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误

"Conversion to non-scalar type is requested" error on linux terminal using cmake

本文关键字:type non-scalar is requested 错误 to Conversion Linux 终端 使用 cmake      更新时间:2023-10-16

当我尝试使用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(

相关文章: