I am working with the HDFql C++ wrapper library and trying to integrate it with R via Rcpp. I'm an experienced coder in general, but not in C++ specifically. I made another post about trying to resolve an issue with declaration conflicts. The compiler error message is copied below:
../inst/include/HDFql/H5public.h:156:19: error: conflicting declaration ‘typedef long long int ssize_t’ typedef long long ssize_t;
(Link to the actual declaration in the header file)
Basically, both HDFql and Rcpp have typedef
s for long long
and they conflict. However, the HDFql wrapper defines it's own namespace on this line right here, so I don't understand why I'm getting this conflict in the first place (I thought that's what namespaces are for!). I'm hoping a C++ guru can help me with two questions:
- Why is this conflict happening even though the library is using a namespace? (EDIT: @Igor answered this in comment)
- Pretend I'm the developer of the HDFql C++ wrapper (I'm not). How would I change the wrapper library or namespace structure so that these types of conflict can't occur? (Edit: maybe write a second wrapper for HDFql as per this answer?)
I'd appreciate any insights you have!