hello, Error: L6200E: Symbol os_thread_def_blink_LED multiply defined (by led.o and main.o)..i have declared the variable led.h header file. and included the same header file in all the sub files
"It's not rare" I maintain that it is unusual.
"There is also nothing illegal or inherently wrong with doing it" Agreed (my emphasis).
"Just because you haven't come across it much (or at all)" Yes, I have come across it. In particular, there are some simplistic toolchains that don't have a (proper) linker so rely upon #including everything.
"does not provide a true indication of its frequency of use" Maybe.
"You are likely not aware that a .c extension is not an explicit requirement for a source file" I am thoroughly aware of that - also that .h is also just a convention. And, of course, the content of a so-called "header" file is just as much 'C' source text as any other.
"It's more a convention" Indeed - it is entirely convention.
But I maintain that in this case it is most likely a mistake.
Even older RTX revisions used this construct (including a .c file), but that certainly does not make it a proper technique...
Indeed not a language requirement - but some compilers do look at the extension; eg, to choose between C and C++
And some (many? most?) IDEs, and some other tools, do specifically recognise .c and .h extensions
I remember a project once where the authors had tried to be "clever" by distinguishing "private" headers with .h and "public" headers with, IIRC, .e. Of course this was all perfectly legal and valid as far as the 'C' Programming Language is concerned, and seemed like quite a neat idea on the face of it - but caused a number of headaches with all the other tools...
Indeed - it is entirely convention
Ha. And if I'd have said entirely, you'd no doubt have ssid more.
Seems like I replied to one of those people who triggers the (facepalm).