I've installed the avr-gcc compiler and successfully convinced it to compile some test code through the terminal, so I thought I'd have a go at setting it up in code:blocks to make it a little easier to handle.
It seems to have detected it ok and I have it selected in compiler settings, but for some reason it can't find the avr standard libraries when I try to include them (like #include </avr/io.h>
). The same code was fine when compiling using the CLI tool.
I tried manually inserting the file path into the include command (#include </usr/lib/avr/include/avr/io.h>
) which solved the problem, it was able to find it then, but then it encountered an error in io.h where that file tried to include another .h file and again it couldn't be found.
Short of going through every standard library and manually rewriting every include command, is there a setting somewhere to have the compiler automatically search those directories? I tried giving it the address in
Settings/Compiler/Search Directories/Compiler
Settings/Compiler/Search Directories/Linker
Settings/Compiler/Search Directories/Resource Compiler
Settings/Compiler/Toolchain Executables/Additional Paths
but no joy. Anyone out there know of some field or tickbox I should have filled out?