I'm getting compiler errors in all my function prototypes.
The error is "error: expected '=', ',', ';', 'asm' or 'attribute' before 'CALCOR".
CALCOR is the name of the function and the prototype is just the first line of the function followed by a semicolon as Ancient Dragon said in another post.
Function is "int16_t CALCOR(float &Voltage)" with a lot more code afterward.
Prototype is "int16_t CALCOR(float &Voltage);"
kent.johnstone_1
0
Light Poster
Recommended Answers
Jump to PostWhat comes just before the CALCOR(...) prototype and/or function defintion. Also, do you have the prototype before, or after, the function definition? And if the prototype is to be used by other translation units (.C or .CPP files) then it should be declared as "extern" as in
extern int16_t CALCOR(float& …
Jump to Postwhat compiler are you using? Please post the contents of the *.c file where the error appears, or at least the part from line 1 until the line that contains the error.
Another hint: check calibration.h to see if it expects some macro definitions to be defined before including that …
Jump to Postint16_t must be defined somewhere -- I don't see it defined in any of the code you posted. Check the other included files. I don't know anything ab out XC32, but it may not be standard c or c++ complient since it's intended for embedded programs.
All 12 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
kent.johnstone_1
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
kent.johnstone_1
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
kent.johnstone_1
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
kent.johnstone_1
0
Light Poster
kent.johnstone_1
0
Light Poster
kent.johnstone_1
0
Light Poster
Mouche
kent.johnstone_1
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.