undefined first referenced symbol in file

i am trying to do simple logical program . but i got the error "undefined first referenced symbol in file" how to solve this error,i have attached my programm below. please help me . thanking you....

ohh its working now... thanks

ohh its working now... thanks sir..

Yogesh, You check the option

Yogesh, You checked the option Call from Foreign RTOS in the codegen screen. That option for linking with some other RTOS (That's why main is undefined). Uncheck that and you should be fine.