Skip to main content

PhoneME advance release needs additional header files for type conversion?

No replies
royzhou2_phoneme
Offline
Joined: 2008-05-10
Points: 0

Hi, Dear Hinkmood,

I am eager to get your answer of my failure to build PhoneME advice release b97 on November 2008. The issue is about dereferencing pointer to incomplete type.

Looks like to MIDP build procedure, a lot of JNI code to convert the JNI defined types to local cc used data type always have this dereferencing pointer error during my building.

I would like is this due to missing header files for my building?

/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c: In function `CNIjavax_microedition_lcdui_Font_init':
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:71: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:72: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c: In function `CNIjavax_microedition_lcdui_Font_charWidth':
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:103: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:103: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:103: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c: In function `CNIjavax_microedition_lcdui_Font_charsWidth':
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:152: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:152: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:152: error: dereferencing pointer to incomplete type
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c: In function `CNIjavax_microedition_lcdui_Font_stringWidth':
/home/rzhou/pkg/src/phoneme_advanced_mr2_2008_October/midp/build/linux_fb_gcc/../../src/lowlevelui/graphics_api/gxapi_native/native/gxapi_font_kni.c:199: error: dereferencing pointer to incomplete type

The line 71 source is listed as follows:

*

*
* @param face The face of the font to initialize
* @param style The style of the font to initialize
* @param size The point size of the font to initialize
*/
KNIEXPORT KNI_RETURNTYPE_VOID
KNIDECL(javax_microedition_lcdui_Font_init) {
int size = (int)KNI_GetParameterAsInt(3);
int style = (int)KNI_GetParameterAsInt(2);
int face = (int)KNI_GetParameterAsInt(1);
int ascent, descent, leading;

KNI_StartHandles(1);
KNI_DeclareHandle(thisObject);

KNI_GetParameterAsObject(0, thisObject);

gx_get_fontinfo(face, style, size, &ascent, &descent, &leading);

SNI_BEGIN_RAW_POINTERS;

GET_FONT_PTR(thisObject)->baseline = (jint)ascent; // <--- line 71 dereferencing pointer to incomplete type.

GET_FONT_PTR(thisObject)->height = (jint)(ascent + descent + leading);

SNI_END_RAW_POINTERS;

KNI_EndHandles();
KNI_ReturnVoid();
}

I really need to resolve this issue as soon as possible. Thanks for your help in advance.

Sincere Regards,
Roy Zhou