【问题标题】:wxFreeChart and -mthreadswxFreeChart 和 -mthreads
【发布时间】:2015-02-09 23:03:23
【问题描述】:

我正在尝试为 Windows 平台开发一些绘图应用程序。我正在使用 Debian 并构建 wxWidgets 用于交叉编译,如 here 所述。 使用 MinGW 编译器,它可以完美运行,我在 Linux 下创建 Win32 应用程序没有问题。但是我在使用 wxFreeChart 时遇到了一些麻烦。 我跑./configure --host=i386-mingw32 --with-wx-config=/usr/local/i586-mingw32/bin/wx-config 然后我运行'make'并得到关于

的错误

无法识别的命令行选项'-mthreads

完整输出:

~/dev/freechart/bk-deps g++ -c -o wxfreechart_lib_legend.o -I./include -I/usr/local/i586-mingw32/lib/wx/include/i586-mingw32msvc-msw-unicode- static-3.0 -I/usr/local/i586-mingw32/include/wx-3.0 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__ -mthreads -O2 ./src/legend.cpp g++:错误:无法识别的命令行选项“-mthreads” make: *** [wxfreechart_lib_legend.o] 错误 1

我看到的唯一建议是从代码中删除“-mthreads”,但我不知道它在哪里(

【问题讨论】:

  • 它可能来自wx-config 输出,虽然我不知道为什么它首先存在,但您可以编辑/usr/local/i586-mingw32/bin/wx-config 并从那里删除此选项作为快速破解。

标签: windows cross-platform wxwidgets mingw32


【解决方案1】:

上述问题已解决,但构建 wxFreeChart 仍然没有运气。 我得到的下一个错误是关于一些额外的库,我最终解决了 CPPFLAGS="-I/usr/i586-mingw32msvc/include -I~/dev/wxWidgets-3.0.2/include" ./configure --host=i386-mingw32 --with-wx-config=/usr/local/i586-mingw32/bin/wx-config 我不确定从源文件夹 ~/dev/wxWidgets 中包含 .h 是个好主意,但至少它解决了一些问题。

现在 ma​​ke 会因以下消息而崩溃:

In file included from /usr/local/i586-mingw32/include/wx-3.0/wx/wx.h:17:0, from ./include/wx/wxfreechartdefs.h:20, from ./include/wx/legend.h:13, from ./src/legend.cpp:10: /usr/local/i586-mingw32/include/wx-3.0/wx/list.h: In constructor ‘wxListKey::wxListKey(const wxString&)’: /usr/local/i586-mingw32/include/wx-3.0/wx/list.h:381:40: error: invalid use of incomplete type ‘class wxString’

/usr/local/i586-mingw32/include/wx-3.0/wx/containr.h:247:13: error: incomplete type ‘wxNavigationEnabled<wxControl>::BaseWindowClass {aka wxControl}’ used in nested name specifier make: *** [wxfreechart_lib_legend.o] Error 1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-25
    • 2011-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多