I am trying to create a C++ wrapper (adding object orientation) around a C library (of which I am the author, i.e. I can apply changes there if needed). The C library defines some structs that make use of size_t
as defined in linux/types.h
since it interfaces with the kernel.
I am now trying to include the header of the C library (that defines the struct) in the sources of my attempt at a C++ library. However, if I do so, the compiler tells me that
size_t
does not name a type
What is the correct way to get access to size_t
from linux/types.h
in C++
?
P.S.: The header file contains a #ifdef _cplusplus extern "C" { #endif
block
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…