warning implicit declaration of function with C30 in MPLABX (Mystery Solved)
My pardons if this is a duplication, but there was a doubt that I posted this the first time. So just to be sure...
MPLAB X 5.25
Windows 10 Enterprise
EDIT: Skip to the "solution"
The problem has nothing to do with C30, in fact it looks like the warning comes before the compiler is even called, which I did not notice at first. This is a quirk of the IDE. Any code that uses a #include that is not directly in the code file looks undefined to the IDE. Similarly (This is conjecture), it looks like a #include that is for a .h file that was already included in some other file, may trigger the usual "#ifndef" block that surrounds the contents of the .h file, thereby not allowing the IDE to read the defines in that .h file for that code (.c) file.
Because this is an oddity of the IDE, I am now ignoring it. This is conjecture which explains the behavior I see. I do not have time to gerrymander my code to align the #include files for the IDE, so I will ignore the warning. If anyone has a better explanation, I am all ears. :)
Yes, this is C30, not XC16. I am migrating from legacy MPLAB 8 projects to MPLAB X and I only want to debug one thing at a time instead of the IDE, compiler, linker, etc. all at once.
I faithfully followed the MPLAB 8 to MPLAB X migration tutorial and am getting this warning with this project:
../Depth.c: In function 'DeviceCalibrate':
../Depth.c:281: warning: implicit declaration of function 'RetardClock'
The function 'RetardClock' is also called from another function in this source file, and from that function, no warning is issued.
I have the relevant .h file in the projects header files list, I have the #include of the .h file (timers.h) in my source code, and the IDE has properly referenced the folders where this source lies. This compiler does not give this warning in my MPLAB 8 project. I have successfully migrated four other projects without warnings. This one is the first to give me trouble.
The program works fine in the device as far as I can tell right now. I just do not like inexplicable warnings coming from my compiler.
Does anyone have an idea about what I might be missing that gives me this warning? I am all ears (eyes)!
post edited by firstname.lastname@example.org - 2019/11/20 14:59:12