任何修复错误的建议?

我正在使用带有wx小部件2.8的代码块,并且当我使用GNU GCC编译器时程序编译良好 .

现在我想编译并能够在ARM(beaglebone black)上运行,但是我收到了以下错误 . 我将工具链设置更改为指向arm-linux-gnueabi .

> -------------- Build: Debug in assignment (compiler: GNU GCC Compiler for ARM)---------------
> 
> arm-linux-gnueabi-g++ -Wall -g
> -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -Winvalid-pch -include wx_pch.h -Wno-unused-local-typedefs -DWX_PRECOMP -g -Iinclude -c assignmentApp.cpp -o obj/Debug/assignmentApp.o In file included from
> /usr/include/wx-2.8/wx/memory.h:16:0,
>                  from /usr/include/wx-2.8/wx/object.h:20,
>                  from /usr/include/wx-2.8/wx/wx.h:16,
>                  from /usr/include/wx-2.8/wx/wxprec.h:68,
>                  from ./wx_pch.h:14,
>                  from <command-line>:0: /usr/include/wx-2.8/wx/string.h:827:13: error: ‘wxChar&
> wxString::operator[](unsigned int)’ cannot be overloaded
>      wxChar& operator[](unsigned int n)
>              ^ /usr/include/wx-2.8/wx/string.h:824:13: error: with ‘wxChar& wxString::operator[](wxStringBase::size_type)’
>      wxChar& operator[](size_type n)
>              ^
  • 编辑

好吧,我会尽力而为 .

首先,我在代码块上创建了一个新的wxwidget项目 . 默认项目是带有帮助和退出按钮的hello world GUI .

我接下来通过下载arm-linux-gnueabihf包配置了arm编译器 .

在编译器设置下,我选择了

C compiler:               arm-linux-gnueabihf-gcc
c++ compiler:             arm-linux-gnueabihf-g++
linker for dynamic libs:  arm-linux-gnueabihf-g++
linker for static libs:   arm-linux-eabihf-ar
debugger:                 (default) --invalid debugger--
resource compiler:        (empty)
make program:             make

然后我转到代码块菜单并单击项目 - >构建选项选择myHellowworld项目并选择我刚刚配置的arm编译器 .

我单击Build并在第一篇文章中收到错误,这也适用于我的其他项目 .