How to build cocos2dx with marmalade UI libraries in one project?

I tried build cocos2dx with marmalade UI (iwNui) library in one project but it’s failed.

X86 version of the project compiled successful but it’s app has crashing in strange places or showing asserts about fonts in simulator.
ARM version don’t compiled - error MSB6006: “link.exe” exited with code 65536.
In log ARM build has a lot of messages about a conflicts of redefinition from iwgxfont:
@
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ftgrays.obj)((.constdata+0x0)) : multiple definition of `ft_grays_raster’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/smooth.obj((.rodata+0x18)) : first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ftsmooth.obj)((.constdata+0x0)) : multiple definition of `ft_smooth_lcd_renderer_class’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/smooth.obj((.rodata+0x80)) : first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ftsmooth.obj)((.constdata+0x0)) : multiple definition of `ft_smooth_lcdv_renderer_class’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/smooth.obj((.rodata+0xc8)) : first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ftsmooth.obj)((.constdata+0x0)) : multiple definition of `ft_smooth_renderer_class’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/smooth.obj((.rodata+0x38)) : first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ttdriver.obj)((.constdata+0x0)) : multiple definition of `tt_driver_class’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/truetype.obj((.rodata+0xa0)) : first defined here
1>
1>
1> c:/marmalade/5.2/s3e/gcc/bin/…/lib/gcc/arm-none-eabi/4.4.1/…/…/…/…/arm-none-eabi/bin/ld.exe( Warning) : size of symbol `tt_driver_class’ changed from 104 in Debug_lordOfTheEther_vc10_gcc_arm/truetype.obj to 96 in c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ttdriver.obj)
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ttinterp.obj)((.constdata+0x0)) : multiple definition of `tt_default_graphics_state’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/truetype.obj((.rodata+0x108)) : first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ttinterp.obj): In function `TT_New_Context’:
1>
1>
1> f:.2\modules\iwgxfont\freetype\src\truetype\ttinterp.cpp((i.TT_New_Context+0x0)) : multiple definition of `TT_New_Context’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/truetype.obj© :/wuala/01_dev_works/00_marmalade/se-client/se-client/libs/cocos2d-x/cocos2dx/platform/third_party/marmalade/freetype/src/truetype/ttinterp.c:786: first defined here
1>
1>
1> c:/marmalade/5.2/modules/iwgxfont/lib/arm\libiwgxfont_ttf_d.a(ttinterp.obj): In function `TT_RunIns’:
1>
1>
1> f:.2\modules\iwgxfont\freetype\src\truetype\ttinterp.cpp((i.TT_RunIns+0x0)) : multiple definition of `TT_RunIns’
1>
1>
1> :Debug_lordOfTheEther_vc10_gcc_arm/truetype.obj© :/wuala/01_dev_works/00_marmalade/se-client/se-client/libs/cocos2d-x/cocos2dx/platform/third_party/marmalade/freetype/src/truetype/ttinterp.c:7414: first defined here
1>
1>
1> collect2: ld returned 1 exit status
@

I guess that it’s problem with iwgxfont library.
This looks like what is iwgxfont has full freetype inside itself.
Is exist any way to compile cocos2dx without a freetype? Or way to fix these conflicts?

Thanks.

I did built it’s successfully by adding prefix CC for all conflicted freetype function in sources.