I spent a good part of this evening trying to figure out why I could build AVR projects in CodeBlocks using an old profile (i.e., personality) but not a new one. When I tried to compile with a new one (even on a different machine), the compile would generate a
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
error.
By comparing the old and newly created profiles, I was able to figure out that new profiles were setting default include directories for building indiscriminately versus not at all for the old profile. The following seems to fix things, but to be honest I have not tested a wide variety of AVR builds nor have I tested any other kinds of projects. But I can't see why it should mess anything else up.
- Open Settings > Compiler and debugger... > Global compiler settings
- Under Selected compiler, select "GNU AVR GCC Compiler"
- Select the "Search directories" tab
- Select the "Compiler" tab
- Select the /usr/include entry and click the "Delete" button
- Right next to the "Compiler" tab, select the "Linker" tab
- Select the /usr/lib entry and click the "Delete" button
4 comments:
Much Helpful and Clear
Thanks a lot! Just upgraded to Code::Blocks 12.11 and encountered this issue.
Thanks a lot! Works fine with Code::Blocks 10.05
Works fine with Code::Blocks 10.05 under Ubuntu 12.04
Post a Comment