compile problem with libcache

I would like to use the cache_init() function and the CACHE_FLUSH()
macro in a C++ project.

The compiler says:

undefined reference to `cache_init(int, cache_ctrl*, char const*)

<sys/cache.h> is included
“libcache” is added as a static library in the project

What’s wrong?

Armand