Adding compiler warnings to your preference settings should also help identify problems (assuming you are using the Arduino IDE).
Using main() directly is not usual in Arduino programming.
The problem is it is not in code tags! Check the forum guidelines about how to post then you can update your post to include code tags and post a new reply with the standard required information.