0

Understanding Compiler Errors and Warning
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Understanding Compiler Errors and Warning

by Russ Nagel on Thu May 22, 2008 10:00 am

All

I am using AVR Studio Ver 4.13 with SP 2. Can someone direct me to a source that helps explain compiler errors?

I am getting:
../Pushthebutton.c:20: error: expected expression before 'int'



Thanks
Russ
Russ Nagel
 
Posts: 18
Joined: Fri Mar 07, 2008 9:10 pm

by MrShifty on Thu May 22, 2008 12:43 pm

I develop on Linux, but I'll bet that ARV Studio's errors are similar to those that GCC outputs. Here are some lists, but they are by no means exhaustive:
http://www.digitalfanatics.org/index.ph ... ilerErrors
http://www.network-theory.co.uk/docs/gc ... ro_94.html

Anyway, that error looks like a syntax-related error (misplaced punctuation or whitespace). If you post a snippet of your code around the offending line, we can help you debug.
MrShifty
 
Posts: 24
Joined: Thu May 15, 2008 3:11 pm
Location: Las Cruces, New Mexico

Thanks

by Russ Nagel on Thu May 22, 2008 12:59 pm

I'll put the links you provided in my favorites. After taking a break I took a closer look and found the error. I wanted to give a parameter I was passing to a function a type (int) when I had already done that previously in the program.

Thanks for your help

Russ
Russ Nagel
 
Posts: 18
Joined: Fri Mar 07, 2008 9:10 pm

Please be positive and constructive with your questions and comments.