# ARM Compiler Error

**URL:** <https://forum.sierrawireless.com/t/arm-compiler-error/2902>\
**Category:** Development tools\
**Created:** [February 5, 2009, 8:37pm UTC](https://forum.sierrawireless.com/t/arm-compiler-error/2902 "2009-02-05T20:37:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.sierrawireless.com/u/Ryan)\
**Post date:** [February 5, 2009, 8:37pm UTC](https://forum.sierrawireless.com/t/arm-compiler-error/2902/1 "2009-02-05T20:37:56Z")

</div>

I have a very large project that compiles and runs just fine with GCC. We wanted to move to the RVDS compiler but when I compile I get this error during the linking phase:

> [@](#):
>
> Analyze errors in tmp files if they exists.
> 
> ```
> rvds_App-Target_1MB+_err_lnk.tmp : 3 : Error: L6218E: Undefined symbol main (referred from kernel.o).
> rvds_App-Target_1MB+_err_lnk.tmp : 3 : Error: L6218E: Undefined symbol main (referred from kernel.o).
> 
> ```

The problem is that we don’t have a “kernel.c” in our project. I looked through the map file and found this:

> [@](#):
>
> Loading member kernel.o from c\_5.l.  
> definition: \_\_rt\_entry  
> definition: \_\_rt\_exit  
> definition: \_\_rt\_abort  
> reference : \_\_rt\_lib\_init  
> reference : \_\_rt\_lib\_shutdown  
> reference : \_\_rt\_stackheap\_init  
> reference : \_platform\_post\_lib\_init  
> reference : \_platform\_post\_stackheap\_init  
> reference : \_platform\_pre\_lib\_shutdown  
> reference : \_platform\_pre\_stackheap\_init  
> reference : \_sys\_exit  
> reference : exit  
> reference : main

So the ARM compiler’s kernel.o is being pulled into the project. This doesn’t happen if I build any of the samples I’ve tested! And again, this code compiles just fine with GCC. Does anyone know what I’m doing to cause the RVDS compiler to pull in a part of kernel.o that requires a main() function?
