PoseLib/PoseLib

Build error in robust/sampling - size_t not declared

v-pnk opened this issue · 4 comments

v-pnk commented

Hi and thank you for the code!
I was not able to build the library recently, getting error: ‘size_t’ was not declared in this scope for sampling.h and sampling.cc.

Probably something in my setup (Ubuntu 22.04, CMake 3.22.1, GCC 11.2.0) or installed libraries is causing the issue, as it seems to work for everyone else. However, adding #include "PoseLib/types.h" to sampling.h fixes the problem for me.

Interesting. Maybe more modern gcc variants are more strict, I am currently using 9.4. I never thought about it before since many headers pull in size_t by default. You could add "#include " to sampling.h which I think should resolve it.

I could replicate the issue using docker. It seems we need a fix for this.

Proposed fix from @v-pnk
#51

I will create another PR with a Dockerfile to be able to compile PoseLib inside docker and make these tests easier.

Also check this PR #52 (if you want test the docker images).