Hi Adam,
> I'm trying to compile CppUTest for my embedded platform and am getting the following warning:
>
> compiling AllocLetTestFree.c
> ....
> tests/AllocLetTestFree.c:8:20: error: memory.h: No such file or directory
>
> As an embedded guy I don't really do C++ and am not too interested in it other than I would like to get these unit tests running on my platform for peace of mind. My cross compiler is gcc based and has C++ compiler. I've done some digging and can't find a memory.h include file for the C compiler but can find a memory file for the C++ compiler. But now I'm confused because everything I can find on the C Standard Library doesn't indicate that there should be a memory.h file.
Yes, I don't think it belongs there. I've deleted the #include in the latest CppUTest (which is now on github)
> Can someone please explain to me what's going on here in relation to the CPPUTEST_USE_STD_C_LIB macro and whether the above error means that my cross compiler is going to be able to compile CppUTest?
The memory.h is a mistake and shouldn't be there. It is deleted again (and thanks for the bug report :P).
The CPPUTEST_USE_STD_C_LIB is a switch that can be used for turning off the dependencies to the Standard C library. This is only really used for linux kernel development where you don't have standard C available. Using it without linking the kernel replacement std C libraries would lead to trouble :)
So, to resolve your problem, you can do 2 things:
- Delete the memory.h include (shouldn't impact your compilation at all!)
- Grab the latest CppUTest from
https://github.com/basvodde/cpputest
Hope this helps?
Thanks!
Bas
ps. for others who are wondering. We are in the process of moving CppUTest away from sourceforge and onto github, so there are now no more commits in source forge
> Cheers
> Adam