BREW platform - Undefined symbol main

248 views Asked by At

I'm creating application for BREW platform in C++. I'm using Visual Studio and on Brew Simulator project works fine. But there's a error while compiling ARM compilator:

error: L6218E: Undefined symbol main (referred from kernel.o)

I've done some research, and I have found this:

http://brew.wardco.com/rvct.html

And there's still this error. I tried to put dummy int main() anyway in AEEModGen.c. There's no error while compiling but of course application wouldn't start.

A dummy main() won't work because you are still dragging all this RTL machinery and it won't be able to succesfully initalize in the BREW environemnt.

I have no idea where start for looking my problem, can anybody solved this case?

Here's the code I put in AEEModGen.c:

#ifndef AEE_SIMULATOR

#ifdef __cplusplus
extern "C"
{
#endif
    void * __aeabi_vec_ctor_nocookie_nodtor(    void* user_array,
                                               void* (*constructor)(void*),
                                               size_t element_size,
                                               size_t element_count) 

    {
        size_t ii = 0;
        char *ptr = (char*) (user_array);
        if ( constructor != NULL )
            for( ; ii != element_count ; ii++, ptr += element_size )
                constructor( ptr );
        return user_array;
    }
#ifdef __cplusplus
}
#endif
#endif
0

There are 0 answers