# Codewarrior maincrt.obj error

**URL:** <https://discourse.libsdl.org/t/codewarrior-maincrt-obj-error/6914>\
**Category:** SDL Development\
**Created:** [June 20, 2002, 10:06am UTC](https://discourse.libsdl.org/t/codewarrior-maincrt-obj-error/6914 "2002-06-20T10:06:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Corliss](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/e47c2d/32.png) [@John\_Corliss](https://discourse.libsdl.org/u/John_Corliss)\
**Post date:** [June 20, 2002, 10:06am UTC](https://discourse.libsdl.org/t/codewarrior-maincrt-obj-error/6914/1 "2002-06-20T10:06:00Z")

</div>

Mario, I’m having the exact same problem you described with codewarrior 7  
in this thread.

[http://www.libsdl.org/pipermail/sdl/2002-February/042237.html](http://www.libsdl.org/pipermail/sdl/2002-February/042237.html)

Specifically  
6) All test projects complained about an undefined symbol “\_main” in  
SDLmain.x86.lib or MSL-All-DLL\_x86.lib (maincrt.obj).

I’m not sure how to solve it however from your post. Where are you  
defining “main”? This define is not fixing the problem with me. Any light  
you can shed is greatly appreciated!

#if defined(\_MSC\_VER) && !defined(\_WIN32\_WCE)  
/\* The VC++ compiler needs main defined \*/  
#define console\_main main  
#endif

Thank you  
John Corliss

---

<div class="post-metadata">

**Author:** ![Keith\_Swyer](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/ed655f/32.png) [@Keith\_Swyer](https://discourse.libsdl.org/u/Keith_Swyer)\
**Post date:** [June 20, 2002, 10:18am UTC](https://discourse.libsdl.org/t/codewarrior-maincrt-obj-error/6914/2 "2002-06-20T10:18:01Z")

</div>

hi, i am currently using CW7 and have working project files for the tests. i  
am not sure where you got yours from, but i worked with another guy about a  
month ago to get things working. are you compiling for windows or mac?? i’m  
assuming windows. If so, make sure you have both MSL\_All\_x86.lib and  
MSL\_All\_x86\_D.lib as libs. i know it doesn’t make sense, but that should  
work. if not, i can send you a project file for CW7.

–keith\> Mario, I’m having the exact same problem you described with codewarrior 7

> in this thread.
> 
> [http://www.libsdl.org/pipermail/sdl/2002-February/042237.html](http://www.libsdl.org/pipermail/sdl/2002-February/042237.html)
> 
> Specifically  
> 6) All test projects complained about an undefined symbol “\_main” in  
> SDLmain.x86.lib or MSL-All-DLL\_x86.lib (maincrt.obj).
> 
> I’m not sure how to solve it however from your post. Where are you  
> defining “main”? This define is not fixing the problem with me. Any light  
> you can shed is greatly appreciated!
> 
> #if defined(\_MSC\_VER) && !defined(\_WIN32\_WCE)  
> /\* The VC++ compiler needs main defined \*/  
> #define console\_main main  
> #endif
> 
> Thank you  
> John Corliss
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
