[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] hard to find the correct include files at compile time
From: |
Ivaylo Ganchev |
Subject: |
[avr-gcc-list] hard to find the correct include files at compile time |
Date: |
Tue, 25 Nov 2014 14:57:31 +0100 (CET) |
User-agent: |
SquirrelMail/1.4.17 |
Hello,
I have a strange behavior while compiling an avr project with code-blocks.
In my code I include the <avr/pgmspace.h>. The file is situated in
/usr/lib/avr/include/avr/pgmspace.h
The pgmspace.h includes <inttypes.h>. The problem is that at compile time
the wrong inttypes.h is included -- the one which is part of the x86
architecture. I am forced to make an explicit statement (#include
"/usr/lib/avr/include/inttypes.h") to solve the issue.
Is it a normal behavior ? Should I set a compile-time variables in
code-blocks so that the correct file is included ?
As a side-note the pgmspace.h includes also <stddef.h>. I am not sure
whether the correct one is charged. To be sure I also make an explicit
statement (#include "/usr/lib/gcc/avr/4.7.2/include/stddef.h"). What is
more strange is that both files are not in the same part of the directory
tree. Is there a logic behind it that I cannot understand ?
Best regards,
--
Ivaylo Ganchev
- [avr-gcc-list] hard to find the correct include files at compile time,
Ivaylo Ganchev <=