[linux]invalid conversion from 'void*' to 'HB_PositionRec_*'

2017-2-15 写技术

I get some errors while compilling Qt_ARM:


../3rdparty/harfbuzz/src/harfbuzz-buffer.c: In function 'HB_Error hb_buffer_ensure(HB_BufferRec_*, HB_UInt)':

../3rdparty/harfbuzz/src/harfbuzz-buffer.c:77: error: invalid conversion from 'void*' to 'HB_PositionRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:81: error: invalid conversion from 'void*' to 'HB_GlyphItemRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:86: error: invalid conversion from 'void*' to 'HB_GlyphItemRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:97: error: invalid conversion from 'void*' to 'HB_GlyphItemRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c: In function 'HB_Error hb_buffer_duplicate_out_buffer(HB_BufferRec_*)':
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:115: error: invalid conversion from 'void*' to 'HB_GlyphItemRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c: In function 'HB_Error hb_buffer_new(HB_BufferRec_**)':
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:134: error: invalid conversion from 'void*' to 'HB_BufferRec_*'
../3rdparty/harfbuzz/src/harfbuzz-buffer.c: In function 'HB_Error _hb_buffer_clear_positions(HB_BufferRec_*)':
../3rdparty/harfbuzz/src/harfbuzz-buffer.c:215: error: invalid conversion from 'void*' to 'HB_PositionRec_*'
make[1]: *** [.obj/release-shared-emb-arm/harfbuzz-buffer.o] Error 1
make[1]: Leaving directory `/usr/local/Qt_ARM/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2

In fact, this is because of compiler g++ cann't convert pointer while compiling a C program. I found there's an error in Makefile of 'src/corelib':
CC            = /opt/crosstool/gcc-4.4.3/bin/arm-linux-g++
CXX           = /opt/crosstool/gcc-4.4.3/bin/arm-linux-g++

So change the CC to correct value.
CC            = /opt/crosstool/gcc-4.4.3/bin/arm-linux-gcc
CXX           = /opt/crosstool/gcc-4.4.3/bin/arm-linux-g++

It works!

标签: linux

评论:


2017-02-16 14:24
In fact I made a mistake the last step:
http://log.anycle.com/skill/232.html
上一步弄错了,把CC转成了g++

发表评论:

Powered by anycle 湘ICP备15001973号-1