[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange behavior when building
I'm starting to develop some simple applications with RTEMS to an ERC32 BSP.
The last one has some .c files and only one header, which I #included in all
source files (in a way similar to some of the RTEMS examples).
Sometimes when trying to build, I got a "multiple definition" error. This is
not related to any specific change I made - I can change, for example, the
text in a printf call and the error can happen.
When the error happens, to build my application, I have to:
1. execute a "make clean"
2. comment the "confdefs.h" include
3. execute make (different errors will happen, because there's no confdefs
4. decomment the "confdefs.h" and
5. execute make again (this time it'll work)
If I change the includes over the source files (including bsp.h, stdio.h and
stdlib.h in each one) the problem stops. But I want to understand why this
is happening, and I would like to avoid including the same set of headers in
There is a snippet of the header:
#ifndef CONFIG_H_ //guard
#include <confdefs.h> //this is the line I have to comment when the error
Any comment will be very appreciated.
Thank you in advance,
Fabrício de Novaes Kucinskis - DEA / INPE
Divisão de Eletrônica Aeroespacial
Instituto Nacional de Pesquisas Espaciais