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

Developer

Forums

Hello everyone,

I am using RVCT 3.0 for BREW compiler, and my binary runs fine on the device, as long as I don't call any functions from standard C library, like fopen() for example. As soon as I call any such function device crashes.

Does RVCT 3.0 for BREW compiler support standard C library functions like fopen? If it does, what can I do to fix this?

Thanks.

You mustn't use standard C library functions in Brew. Brew provides wrappers around these functions in the form of helper functions.

You mustn't use standard C library functions in Brew. Brew provides wrappers around these functions in the form of helper functions.

adhudase;81268 wrote:You mustn't use standard C library functions in Brew. Brew provides wrappers around these functions in the form of helper functions.
So the library files of RVCT 3.0 for BREW contain standard C library functions (because linker obviously finds something to link to) but these functions always crash when called?
Yet this is never mentioned in RVCT 3.0 for BREW documentation?

adhudase;81268 wrote:You mustn't use standard C library functions in Brew. Brew provides wrappers around these functions in the form of helper functions.
So the library files of RVCT 3.0 for BREW contain standard C library functions (because linker obviously finds something to link to) but these functions always crash when called?
Yet this is never mentioned in RVCT 3.0 for BREW documentation?

This is Brew feature. AS C library is too big to port on mobile handsets, Brew provides wrappers for few C APIs.
You can see this mentioned in Brew docs on developer extranet.

This is Brew feature. AS C library is too big to port on mobile handsets, Brew provides wrappers for few C APIs.
You can see this mentioned in Brew docs on developer extranet.

adhudase;81273 wrote:This is Brew feature. AS C library is too big to port on mobile handsets, Brew provides wrappers for few C APIs.
You can see this mentioned in Brew docs on developer extranet.
Thank you very much for your answers.
Can you please point me to RVCT for BREW documentation where it says that standard C library is not supported on BREW platform? It would be one thing if RVCT for BREW compiler came without standard library, but to provide standard library which crashes on every call is a little too far, don't you think?

adhudase;81273 wrote:This is Brew feature. AS C library is too big to port on mobile handsets, Brew provides wrappers for few C APIs.
You can see this mentioned in Brew docs on developer extranet.
Thank you very much for your answers.
Can you please point me to RVCT for BREW documentation where it says that standard C library is not supported on BREW platform? It would be one thing if RVCT for BREW compiler came without standard library, but to provide standard library which crashes on every call is a little too far, don't you think?

I said Brew doesn't support C standard library directly.
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/developerfaq...

I said Brew doesn't support C standard library directly.
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/developerfaq...

adhudase;81277 wrote:I said Brew doesn't support C standard library directly.
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/developerfaq...
Brew doesn't have to "support" it. Compiler should provide standard library implemented using platform APIs (in this case BREW platform APIs). There is nothing that BREW platform itself has to do in order to "support" it. Compiler is supposed to come with fopen() implemented using a call to IFILEMGR_OpenFile(), etc.
Again, I would understand if compiler came without standard library. But this is not the case here. Compiler has all the standard library functions to link to, but they all crash when called. Additionally, a compiler specifically targeted for BREW platform (after all it's called RVCT 3.0 for BREW) doesn't mention anywhere that standard library implementation they provide would crash on every call?

adhudase;81277 wrote:I said Brew doesn't support C standard library directly.
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/developerfaq...
Brew doesn't have to "support" it. Compiler should provide standard library implemented using platform APIs (in this case BREW platform APIs). There is nothing that BREW platform itself has to do in order to "support" it. Compiler is supposed to come with fopen() implemented using a call to IFILEMGR_OpenFile(), etc.
Again, I would understand if compiler came without standard library. But this is not the case here. Compiler has all the standard library functions to link to, but they all crash when called. Additionally, a compiler specifically targeted for BREW platform (after all it's called RVCT 3.0 for BREW) doesn't mention anywhere that standard library implementation they provide would crash on every call?