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

Developer

Forums

Forums:

Hi, I have the following issue.

I can build my application succesfully with IBilling via Visual Studio. But when building with gcc, the following error appears:

 

InAppPurchases.h:522: error: invalid conversion from `const void*' to `void*'

I found out it was due to the following macro:

 

#define IBILLINGTX_SetPrice(pMe, price, description, result) \

{\

   WebOpt WO[5];\

   WO[0].nId  = IBILLING_OPT_AMOUNT;\

   WO[0].pVal = (price->szHandle);\

   WO[1].nId  = IBILLING_OPT_CURRENCY;\

   WO[1].pVal = ("AVB");\

   WO[2].nId  = IBILLING_OPT_DESCRIPTION;\

   WO[2].pVal = (description);\

   WO[3].nId  = IBILLING_OPT_CONTENTFEE;\

   WO[3].pVal = (price->szDap);\

   WO[4].nId  = WEBOPT_END;\

   (result)   = AEEGETPVTBL((pMe),IBillingTX)->AddOpt((pMe), WO);\

}

If I equal WO[1].pVal to a variable, instead of the plain string, the error is gone.Should the variable contents be:  a) ("AVB")?? or  b) the currency I need (i.e. "USD")??In case (a) is correct: Should the XML currency (szCurrency) be also "AVB" for each price??Hope I'm making myself clear enough. Thanks in advance.

 

 

its OK to assign it to a char *str = "AVB";
& then do WO[1].pVal = (void*)str;\

its OK to assign it to a char *str = "AVB";
& then do WO[1].pVal = (void*)str;\

Thanks, Shivendra,
I was just hesitant about modifying the header file.
Have a happy new year! ;) (a little late, though...)

Thanks, Shivendra,
I was just hesitant about modifying the header file.
Have a happy new year! ;) (a little late, though...)