centos 7 编译 wxWidgets 3.0.2 失败,请帮忙!

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
sunvim
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Dec 23, 2015 9:58 am

centos 7 编译 wxWidgets 3.0.2 失败,请帮忙!

Postby sunvim » Wed Dec 23, 2015 10:03 am

os: centos 7
kernel verison: 3.10.0-229.20.1.el7.x86_64

wxWidgets version : wxWidgets 3.0.2

excute command :

1: ./configure --disable-shared --enable-unicode
2: make

error :

./src/generic/graphicc.cpp: 在构造函数‘wxCairoContext::wxCairoContext(wxGraphicsRenderer*, wxWindow*)’中:
./src/generic/graphicc.cpp:1877:56: 错误:‘gdk_cairo_create’在此作用域中尚未声明
Init(gdk_cairo_create(window->GTKGetDrawingWindow()));
^
./src/generic/graphicc.cpp: 在成员函数‘virtual void wxCairoContext::DoDrawText(const wxString&, wxDouble, wxDouble)’中:
./src/generic/graphicc.cpp:2091:9: 错误:‘PangoLayout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2091:22: 错误:‘layout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2091:67: 错误:‘pango_cairo_create_layout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2093:77: 错误:‘const class wxNativeFontInfo’ has no member named ‘description’
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2093:88: 错误:‘pango_layout_set_font_description’在此作用域中尚未声明
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2094:58: 错误:‘pango_layout_set_text’在此作用域中尚未声明
pango_layout_set_text(layout, data, data.length());
^
./src/generic/graphicc.cpp:2095:14: 错误:‘const class wxFont’ has no member named ‘GTKSetPangoAttrs’
font.GTKSetPangoAttrs(layout);
^
./src/generic/graphicc.cpp:2098:51: 错误:‘pango_cairo_show_layout’在此作用域中尚未声明
pango_cairo_show_layout (m_context, layout);
^
./src/generic/graphicc.cpp:2100:31: 错误:‘g_object_unref’在此作用域中尚未声明
g_object_unref (layout);
^
./src/generic/graphicc.cpp: 在成员函数‘virtual void wxCairoContext::GetTextExtent(const wxString&, wxDouble*, wxDouble*, wxDouble*, wxDouble*) const’中:
./src/generic/graphicc.cpp:2138:9: 错误:‘PangoLayout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2138:22: 错误:‘layout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2138:67: 错误:‘pango_cairo_create_layout’在此作用域中尚未声明
PangoLayout *layout = pango_cairo_create_layout (m_context);
^
./src/generic/graphicc.cpp:2140:77: 错误:‘const class wxNativeFontInfo’ has no member named ‘description’
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2140:88: 错误:‘pango_layout_set_font_description’在此作用域中尚未声明
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2146:58: 错误:‘pango_layout_set_text’在此作用域中尚未声明
pango_layout_set_text(layout, data, data.length());
^
./src/generic/graphicc.cpp:2147:52: 错误:‘pango_layout_get_pixel_size’在此作用域中尚未声明
pango_layout_get_pixel_size (layout, &w, &h);
^
./src/generic/graphicc.cpp:2154:13: 错误:‘PangoLayoutIter’在此作用域中尚未声明
PangoLayoutIter *iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2154:30: 错误:‘iter’在此作用域中尚未声明
PangoLayoutIter *iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2154:65: 错误:‘pango_layout_get_iter’在此作用域中尚未声明
PangoLayoutIter *iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2155:63: 错误:‘pango_layout_iter_get_baseline’在此作用域中尚未声明
int baseline = pango_layout_iter_get_baseline(iter);
^
./src/generic/graphicc.cpp:2156:40: 错误:‘pango_layout_iter_free’在此作用域中尚未声明
pango_layout_iter_free(iter);
^
./src/generic/graphicc.cpp:2157:49: 错误:‘PANGO_PIXELS’在此作用域中尚未声明
*descent = h - PANGO_PIXELS(baseline);
^
./src/generic/graphicc.cpp:2159:31: 错误:‘g_object_unref’在此作用域中尚未声明
g_object_unref (layout);
^
./src/generic/graphicc.cpp: 在成员函数‘virtual void wxCairoContext::GetPartialTextExtents(const wxString&, wxArrayDouble&) const’中:
./src/generic/graphicc.cpp:2206:9: 错误:‘PangoLayout’在此作用域中尚未声明
PangoLayout* layout = pango_cairo_create_layout(m_context);
^
./src/generic/graphicc.cpp:2206:22: 错误:‘layout’在此作用域中尚未声明
PangoLayout* layout = pango_cairo_create_layout(m_context);
^
./src/generic/graphicc.cpp:2206:66: 错误:‘pango_cairo_create_layout’在此作用域中尚未声明
PangoLayout* layout = pango_cairo_create_layout(m_context);
^
./src/generic/graphicc.cpp:2208:77: 错误:‘const class wxNativeFontInfo’ has no member named ‘description’
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2208:88: 错误:‘pango_layout_set_font_description’在此作用域中尚未声明
pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description);
^
./src/generic/graphicc.cpp:2209:58: 错误:‘pango_layout_set_text’在此作用域中尚未声明
pango_layout_set_text(layout, data, data.length());
^
./src/generic/graphicc.cpp:2210:9: 错误:‘PangoLayoutIter’在此作用域中尚未声明
PangoLayoutIter* iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2210:26: 错误:‘iter’在此作用域中尚未声明
PangoLayoutIter* iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2210:61: 错误:‘pango_layout_get_iter’在此作用域中尚未声明
PangoLayoutIter* iter = pango_layout_get_iter(layout);
^
./src/generic/graphicc.cpp:2211:9: 错误:‘PangoRectangle’在此作用域中尚未声明
PangoRectangle rect;
^
./src/generic/graphicc.cpp:2213:64: 错误:‘rect’在此作用域中尚未声明
pango_layout_iter_get_cluster_extents(iter, NULL, &rect);
^
./src/generic/graphicc.cpp:2213:68: 错误:‘pango_layout_iter_get_cluster_extents’在此作用域中尚未声明
pango_layout_iter_get_cluster_extents(iter, NULL, &rect);
^
./src/generic/graphicc.cpp:2215:38: 错误:‘PANGO_PIXELS’在此作用域中尚未声明
widths.Add(PANGO_PIXELS(w));
^
./src/generic/graphicc.cpp:2216:53: 错误:‘pango_layout_iter_next_cluster’在此作用域中尚未声明
} while (pango_layout_iter_next_cluster(iter));
^
./src/generic/graphicc.cpp:2217:36: 错误:‘pango_layout_iter_free’在此作用域中尚未声明
pango_layout_iter_free(iter);
^
./src/generic/graphicc.cpp:2218:30: 错误:‘g_object_unref’在此作用域中尚未声明
g_object_unref(layout);
^
./src/generic/graphicc.cpp:2223:34: 错误:‘PANGO_PIXELS’在此作用域中尚未声明
widths.Add(PANGO_PIXELS(w));
^
./src/generic/graphicc.cpp: 在成员函数‘virtual wxGraphicsContext* wxCairoRenderer::CreateMeasuringContext()’中:
./src/generic/graphicc.cpp:2491:70: 错误:‘gdk_get_default_root_window’在此作用域中尚未声明
return CreateContextFromNativeWindow(gdk_get_default_root_window());

Manolo
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 516
Joined: Mon Apr 30, 2012 11:07 pm

Re: centos 7 编译 wxWidgets 3.0.2 失败,请帮忙!

Postby Manolo » Thu Dec 24, 2015 12:22 am

使用 “disable-shared” 需要其它的库(Cairo, GTK+...)可用为 “static, not-shared”,这是不可能的 Linux 操作系统。
对不起,我用谷歌翻译。

sunvim
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Dec 23, 2015 9:58 am

Re: centos 7 编译 wxWidgets 3.0.2 失败,请帮忙!

Postby sunvim » Thu Dec 24, 2015 7:40 am

Manolo wrote:使用 “disable-shared” 需要其它的库(Cairo, GTK+...)可用为 “static, not-shared”,这是不可能的 Linux 操作系统。
对不起,我用谷歌翻译。


哈哈,没事,更新了以下系统,然后编译就顺利通过了!

可是又遇到一个新的问题:

源码编译 wxFormBuilder ,又报了一个: can't find -lwx_gtk2u_media-3.0 的错!

xiaxia179
In need of some credit
In need of some credit
Posts: 9
Joined: Mon Dec 01, 2014 9:41 am

Re: centos 7 编译 wxWidgets 3.0.2 失败,请帮忙!

Postby xiaxia179 » Tue Dec 29, 2015 8:06 am

没用过centos7 下面是我的编译命令

(1)./configure --enable-shared --disable-debug --enable-threads --enable-monolithic --enable-unicode
(2)./make
(3)./make install
(4). ldconfig
(5). wx-configure --version 检测程序是否安装成功


Return to “wxWidgets Development (Chinese)”

Who is online

Users browsing this forum: No registered users and 3 guests