Subj : Re: Linker Error To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Sat Aug 16 2003 01:07 am Windows GUI programs begin at the function WinMain. OWL programs begin at the function OwlMain. EasyWin programs begin at the function main (and are static linked). I don't think you are writing an OWL program since it already has things such as you show in that class and more. You can't be creating an EasyWin program because if you were you would already have created a function main, so you must be trying for a normal Windows GUI program. Right click on the EXE name in the project window and select TargetExpert from the menu which appears. In the TargetExpert dialog adjust the type of target to be the type you intended. .. Ed > Rupert harrison wrote in message > news:3f3d71a6$1@newsgroups.borland.com... > > Does anyone know how i can solve this linker error my > compiler seems to be giving me every time i try to include > a .h file or create a class. > > Undefined symbol _main in library file C:\TCWIN45\LIB\cwl.lib > > I've tried adding a main() after my class, but that doesn't solve the > problem. I've provided a copy of my .h file. > > #ifndef __RECT_H__ > // Preprocess derective for inclusion > #define __RECT_H__ > #include > > class CRect > { > > public: > int left; > // Public data members > int right; > int top; > int bottom; > > CRect(); > // Constructor declarations > CRect(int left, int top, int right, int bottom); > CRect(CRect &rect); > CRect &operator=(const CRect &rect); > > bool PointWithin(int x, int y); > // Public data functions > int Width(); > int Height(); > > }; > #endif // _ _RECT_H_ _ .