[求助]交叉编译wxwidgets-2.9.4遇到了问题

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
lianxu110
Experienced Solver
Experienced Solver
Posts: 53
Joined: Tue Mar 12, 2013 5:29 am

[求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by lianxu110 » Tue Mar 12, 2013 5:43 am

这几天试了一下交叉编译wxWidgets-2.9.4,这是一个开发版的wxWidgets,我编译的是X11平台上的。编译的过程如下
1 编译zlib ncurses tinyx
这几个是我自己以前就编译好的,直接拿过来就可以了

2 编译 freetype libxml glib cairo libpng pixman libXft fontconfig pango pangox-compat

3 后面再编译的wxWidgets-2.9.4
这个过程虽然出现过一些问题,但是后面都编译通过了。

于是开始编译它后面的例子,编译的是sample下的minimal这个文件夹,这时候在链接的时候就出了问题了,问题挺多的:

dcclient.cpp:(.text+0x5bc4): undefined reference to `pango_x_render'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontSetDestroy'
/build/lib/libSM.so: undefined reference to `_IceErrorBadMinor'
/build/lib/libSM.so: undefined reference to `_IceWrite'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFreeTypeCharIndex'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternAddString'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetCharSet'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternAddMatrix'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcObjectSetCreate'
/build/lib/libSM.so: undefined reference to `IceRegisterForProtocolReply'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetBool'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Load_Glyph'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcDefaultSubstitute'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Get_Kerning'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcCharSetNextPage'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetInteger'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Set_Transform'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcCharSetHasChar'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_double'
/build/lib/libSM.so: undefined reference to `_IceReadSkip'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Get_First_Char'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_pointer'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_sint64'
/build/lib/libSM.so: undefined reference to `IceProcessMessages'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetString'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontSort'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternCreate'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Init_FreeType'
/build/lib/libSM.so: undefined reference to `IceLastSentSequenceNumber'
/build/lib/libSM.so: undefined reference to `IceAllocScratch'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_void'
/build/lib/libSM.so: undefined reference to `IceFlush'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontList'
/build/lib/libSM.so: undefined reference to `IceCloseConnection'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternReference'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcObjectSetAdd'
/build/lib/libSM.so: undefined reference to `_IceErrorBadValue'
/build/lib/libSM.so: undefined reference to `_IceTransGetPeerNetworkId'
/build/lib/libSM.so: undefined reference to `IceProtocolShutdown'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternEqual'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Get_Next_Char'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_sint32'
/build/lib/libSM.so: undefined reference to `IceSetShutdownNegotiation'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcConfigSubstitute'
/build/lib/libSM.so: undefined reference to `_IceRead'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternBuild'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_uint64'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_call'
/build/lib/libSM.so: undefined reference to `IceProtocolSetup'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcCharSetFirstPage'
/build/lib/libSM.so: undefined reference to `IceOpenConnection'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternAddDouble'
/build/lib/libSM.so: undefined reference to `_IceErrorBadLength'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcObjectSetBuild'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Set_Charmap'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Get_Sfnt_Table'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcObjectSetDestroy'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGet'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternDestroy'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontRenderPrepare'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternDuplicate'
/build/lib/libSM.so: undefined reference to `_IcePaMagicCookie1Proc'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Vector_Transform'
/build/lib/libSM.so: undefined reference to `_IcePoMagicCookie1Proc'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontSetSortDestroy'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcFontMatch'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetMatrix'
/build/lib/libSM.so: undefined reference to `_IceErrorBadState'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Done_FreeType'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_uint32'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Set_Char_Size'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_prep_cif'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_New_Face'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Render_Glyph'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternGetDouble'
/build/lib/libSM.so: undefined reference to `IceRegisterForProtocolSetup'
/build/lib/libpangoft2-1.0.so: undefined reference to `FT_Done_Face'
/build/lib/libpangoft2-1.0.so: undefined reference to `FcPatternHash'
/build/lib/libgobject-2.0.so: undefined reference to `ffi_type_float'
collect2: ld returned 1 exit status


我觉得应该是编译哪个库的时候出了问题,少了东西或者版本什么的有问题,但是都没报错。

后面又试了静态编译,编译的时候也没出问题,但是在编译它的例子的时候却出现了一些库找不到的问题,
如下:
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libgthread-2.0.so.0, needed by /build/lib/libgobject-2.0.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libffi.so.6, needed by /build/lib/libgobject-2.0.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libz.so.1, needed by /build/lib/libpangoft2-1.0.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libexpat.so.0, needed by /build/lib/libpangoft2-1.0.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libXrender.so.1, needed by /build/lib/libpangoxft-1.0.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libICE.so.6, needed by /build/lib/libSM.so, not found (try using -rpath or -rpath-link)
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: minimal: hidden symbol `inflateInit2_' in /home/mine/wxx11/wxWidgets-2.9.4/lib/libwxzlib-2.9-arm-linux.a(wxzlib_inflate.o) is referenced by DSO
/arm-2012.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status


想问下各位移植达人,这些问题怎么解决呢,帮帮我吧!

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by kipade » Wed Mar 20, 2013 7:00 am

没有环境,真没法帮你试啊
要不,你列个你的目标平台,以及编译器,X环境
Slackware GNU/Linux
wxWidgets-3.0.3

lianxu110
Experienced Solver
Experienced Solver
Posts: 53
Joined: Tue Mar 12, 2013 5:29 am

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by lianxu110 » Wed Jul 03, 2013 3:21 am

那个问题后面重新编译了一下,多试了几次,终于可以编译通过了,现在在做那方面的开发,遇到的一些问题!
请您到这个网址上帮我看下可以吗?http://bbs.csdn.net/topics/390506586

lianxu110
Experienced Solver
Experienced Solver
Posts: 53
Joined: Tue Mar 12, 2013 5:29 am

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by lianxu110 » Tue Jul 09, 2013 5:45 am

想问下wxWidgets系统会不会回收Panel啊,我这里有切换页面的操作,我在每一个切换页面的操作里新创建了一个wxPanel,但是如果我在创建前释放掉前面的panel的话,会造成一个段错误,我也不知道是为什么造成的那样的错误。

我想问下我在每次都new 一个新的panel,wx的系统有没有去回收那些panel,也就是我的这种操作会不会造成内在泄漏呢?

fancyivan
Experienced Solver
Experienced Solver
Posts: 80
Joined: Wed May 26, 2010 8:42 am
Location: Beijing, China
Contact:

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by fancyivan » Thu Jul 11, 2013 8:06 am

lianxu110 wrote:想问下wxWidgets系统会不会回收Panel啊,我这里有切换页面的操作,我在每一个切换页面的操作里新创建了一个wxPanel,但是如果我在创建前释放掉前面的panel的话,会造成一个段错误,我也不知道是为什么造成的那样的错误。

我想问下我在每次都new 一个新的panel,wx的系统有没有去回收那些panel,也就是我的这种操作会不会造成内在泄漏呢?
wx会自己管理所有new出来的控件。
比如你在你的myframe:wxframe里new wxPanel(this);
当你的myframe退出时,它会自己去destroy你创建的所有子控件。


另外,你是如何翻译掉前面的panel的? myPanel->Destroy(); ?
OS: Win7 Ultimate SP1 x64(Windows XP Pro SP3 in VirtualBox)
Compiler: MinGW32 (gcc4.8.1 + gdb7.6.1)
IDE: Code::Blocks 12.11
Lib: wxWidgets3.0.0

lianxu110
Experienced Solver
Experienced Solver
Posts: 53
Joined: Tue Mar 12, 2013 5:29 am

Re: [求助]交叉编译wxwidgets-2.9.4遇到了问题

Post by lianxu110 » Wed Jul 24, 2013 1:23 am

fancyivan wrote:
lianxu110 wrote:想问下wxWidgets系统会不会回收Panel啊,我这里有切换页面的操作,我在每一个切换页面的操作里新创建了一个wxPanel,但是如果我在创建前释放掉前面的panel的话,会造成一个段错误,我也不知道是为什么造成的那样的错误。

我想问下我在每次都new 一个新的panel,wx的系统有没有去回收那些panel,也就是我的这种操作会不会造成内在泄漏呢?
wx会自己管理所有new出来的控件。
比如你在你的myframe:wxframe里new wxPanel(this);
当你的myframe退出时,它会自己去destroy你创建的所有子控件。


另外,你是如何翻译掉前面的panel的? myPanel->Destroy(); ?


没错,我用的代码就是myPanel->Destroy(); 在把panel销毁前,先销毁了这个窗口下面的一些子窗口。那个销毁panel的原因找到了,是我在销毁它之后,它的一些事件还没有结束。我想定义一个事件,在要销毁的那个panel的事件全都结束之后,再去销毁这个panel以及它所有的子窗口。只是这个事件该怎么去定义与实现,我现在没什么头绪,可以帮下我吗?我的QQ是:360220954,可以加下QQ,以后多交流吗?

Post Reply