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

Developer

Forums

Toolset: 7.6

Platform: 1.0.2.410

Simulator: 7.6 CandyBar

I want to use C++ class defined in


class IAutoInstall{
virtual ::AEEResult CDECL InstallApp (::jams::IApp** app, const char* jadPath, const char* jarPath, ::ISignal* signal) = 0;
;

The above code is surrounded by AEEINTERFACE_CPLUSPLUS

However, if AEEINTERFACE_CPLUSPLUS defined before including , Compilation error happens in AEEIBitmap.h:


c:\program files\qualcomm\brew mp sdk\platforms\1.0.2.410\platform\ui\inc\AEEIBitmap.h(61) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

c:\program files\qualcomm\brew mp sdk\platforms\1.0.2.410\platform\ui\inc\AEEIBitmap.h(61) : warning C4183: 'INHERIT_IQI': missing return type; assumed to be a member function returning 'int'

c:\program files\qualcomm\brew mp sdk\platforms\1.0.2.410\platform\ui\inc\AEEIBitmap.h(66) : error C2039: 'AddRef' : is not a member of 'IBitmapVtbl'

 

The error is caused by AEEINTERFACE_DEFINE not defined.

This question was asked one year ago, and no one answered. See:
Can I define AEEINTERFACE_CPLUSPLUS to enable C++ interface https://developer.brewmp.com/forum/can-i-define-aeeinterfacecplusplus-enable-c-interface-0

you may use AEEINTERFACE_CPLUSPLUS, if you feel a requirement. but you need to use it with care.
 
the compilation errors are comming as  AEEIQI.h bcoz if AEEINTERFACE_CPLUSPLUS is defines the definations of INHERIT_IQI and some other members is ommited.
check AEEIQI.h, you will be clear why you get these errors.
 
Now:-
even if you include some of the files like AEEModGen.h & AEEModGen.h before defining AEEINTERFACE_CPLUSPLUS & then include AEEIBitmap.h, the errors will go away as compiler would get the definations for INHERIT_IQI.
 
it seems the AEEINTERFACE_CPLUSPLUS is for internal use & not for 3rd party Apps, as in some defining more files like AEETelephone, this will cause issues with compiling as some variables are not defined if you enable it.

 

you may use AEEINTERFACE_CPLUSPLUS, if you feel a requirement. but you need to use it with care.
 
the compilation errors are comming as  AEEIQI.h bcoz if AEEINTERFACE_CPLUSPLUS is defines the definations of INHERIT_IQI and some other members is ommited.
check AEEIQI.h, you will be clear why you get these errors.
 
Now:-
even if you include some of the files like AEEModGen.h & AEEModGen.h before defining AEEINTERFACE_CPLUSPLUS & then include AEEIBitmap.h, the errors will go away as compiler would get the definations for INHERIT_IQI.
 
it seems the AEEINTERFACE_CPLUSPLUS is for internal use & not for 3rd party Apps, as in some defining more files like AEETelephone, this will cause issues with compiling as some variables are not defined if you enable it.

 

I resolve it. You have to include AEEIQI.h two times.
And before including it, you have to undef AEEIQI_H to break the ifdef header guard. 

#include
#include
#include
#define AEEINTERFACE_CPLUSPLUS
#undef AEEIQI_H
#include
#include
#include
#include

I resolve it. You have to include AEEIQI.h two times.
And before including it, you have to undef AEEIQI_H to break the ifdef header guard. 

#include
#include
#include
#define AEEINTERFACE_CPLUSPLUS
#undef AEEIQI_H
#include
#include
#include
#include