Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi all,

while using below code i am facing linking error.
can any body help me to resolve the below said issue.

//////////////////////////////////////////////////////////////////////////////////////////////

ISHELL_CreateInstance(pApp->a.m_pIShell,AEECLSID_FONT_BASIC9,(void**)&pApp->pIFont );

IDISPLAY_SetFont(pApp->a.m_pIDisplay,AEE_FONT_NORMAL,pApp->pIFont);
IFONT_GetFontInfo(pApp->pIFont,&pApp->pinfo,sizeof(pApp->pinfo));

pApp->height=pApp->pinfo->nAscent+pApp->pinfo->nDescent;

/////////////////////////////////////////////////////////////////////

The following linking error is encountered.

Linking...
bugsy.obj : error LNK2001: unresolved external symbol _IFONT_GetFontInfo
bugsy.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

There is no such API like IFONT_GetFontInfo. It must be IFONT_GetInfo
-Karthik

There is no such API like IFONT_GetFontInfo. It must be IFONT_GetInfo
-Karthik

IFONT_GetInfo this is not valid function check it out in the api refrencess
correct function is that
int IFONT_GetFontInfo(IFont * pIFont, AEEFontInfo * pinfo, int nSize)

IFONT_GetInfo this is not valid function check it out in the api refrencess
correct function is that
int IFONT_GetFontInfo(IFont * pIFont, AEEFontInfo * pinfo, int nSize)

actually in BREW 2.0 there is no Api like
IFont_GetInfo(....);
There is IFont_GetFontInfo(.....);

actually in BREW 2.0 there is no Api like
IFont_GetInfo(....);
There is IFont_GetFontInfo(.....);

faiz actually there is a contradiction in your statement.what do you want to say.

faiz actually there is a contradiction in your statement.what do you want to say.

IFONT_GetFontInfo()
Description:
This function fills the AEEFontInfo structure with information about the font. The information returned is currently the ascent and descent values.
The size of the structure is passed for backward compatibility. The implementor should only fill the structure up to the specified size. If the size is larger that than the size of AEEFontInfo, this function should return EUNSUPPORTED.
Prototype:
int IFONT_GetFontInfo(IFont * pIFont, AEEFontInfo * pinfo, int nSize)
Parameters:
pIFont [in] Pointer to the IFont Interface.
pinfo [out] Pointer to the AEEFontInfo structure to fill.
nSize [in] Size of structure to fill.
Return Value:
SUCCESS, if font info is retrieved.
EUNSUPPORTED, if the version determined by the size of AEEFontInfo is not supported.
Comments:
IFONT_GetInfo() should always succeed when a valid pinfo pointer is passed and nSize is equal to sizeof(AEEFontInfo).

IFONT_GetFontInfo()
Description:
This function fills the AEEFontInfo structure with information about the font. The information returned is currently the ascent and descent values.
The size of the structure is passed for backward compatibility. The implementor should only fill the structure up to the specified size. If the size is larger that than the size of AEEFontInfo, this function should return EUNSUPPORTED.
Prototype:
int IFONT_GetFontInfo(IFont * pIFont, AEEFontInfo * pinfo, int nSize)
Parameters:
pIFont [in] Pointer to the IFont Interface.
pinfo [out] Pointer to the AEEFontInfo structure to fill.
nSize [in] Size of structure to fill.
Return Value:
SUCCESS, if font info is retrieved.
EUNSUPPORTED, if the version determined by the size of AEEFontInfo is not supported.
Comments:
IFONT_GetInfo() should always succeed when a valid pinfo pointer is passed and nSize is equal to sizeof(AEEFontInfo).

I think the problem you are having is because you are using &pApp->pinfo and it looks like pApp->pinfo is an AEEFontInfo pointer already. This leaves you with an AEEFontInfo ** as the second argument, so the compiler can't find an IFONT_GetFontInfo function with parameters like that. Also, you are using sizeof(pApp->pinfo), which is going to give you the size of a pointer. You probably should just use sizeof(AEEFontInfo) there instead.

I think the problem you are having is because you are using &pApp->pinfo and it looks like pApp->pinfo is an AEEFontInfo pointer already. This leaves you with an AEEFontInfo ** as the second argument, so the compiler can't find an IFONT_GetFontInfo function with parameters like that. Also, you are using sizeof(pApp->pinfo), which is going to give you the size of a pointer. You probably should just use sizeof(AEEFontInfo) there instead.