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 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.
Jump to PostThe nice thing about Microchip programs is you can CTRL click on the defined word and the program will bring up the file that defined it.
Visual Studio does that too -- very handy feature :) Other than that, I can't tell you what the problem is because …
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.