On Sat, Jul 3, 2021 at 5:36 AM murat tologlu <mtolo...@hotmail.com> wrote:
> > Of-course I can modify the c file, Makefile, I can move or copy library > files to appropriate locations to resolve the problem, but I would like to > learn the formal (preferred) way of resolving this issue on Nuttx > because the same code compiles and runs on Ubuntu without any > modification other than removing <nuttx/config.h>. This is not an answer to your question (I'm not sure why that is happening and away from a computer so I can't try to reproduce it now) but just wanted to point out that you don't have to remove the #include <nuttx/config.h> even when compiling on Ubuntu or other OS. You can wrap that include with #ifdef __NuttX__ ... #endif. The toolchain built with NuttX's buildroot defines that symbol, and if you use other toolchains you can add this define to the compiler command line in your board's Make.defs file. Then you can build the exact same source file without modifications or the need to maintain separate branches. (Caveat: I'm writing this all from memory so it's possible some of the names aren't exactly correct, or I'm forgetting some detail.) Hope this is somehow helpful and that you will discover the solution to your actual question very soon... Cheers, Nathan