I compiled my project in 2013 with g++ v. 4.7.3 under Gentoo Linux and Eclipse Indigo with c++11. In this project, I need integer size perfectly defined. So, I used u_int32_t, u_int8_t types.
Today, I have g++ v. 4.9.2 under Debian Jessie, still with Eclipse Indigo. After having cleaned the project, rebuild leads to "type u_int32_t could not be resolved".
My compiler options:
-DDEBUG -ULIMITED_CODE -UDON_T_GROUP_LINES -UREADABLE -ULIMIT_CODES -I/usr/include/c++/4.9.2/ -O0 -g3 -c -fmessage-length=0 -std=c++11
My first attempt was to add #include <cstdint>
or #include <stdint.h>
(deprecated) at the right place, but I get the same error. Seems I have to replace u_int32_t
by uint32_t
everywhere.
I have searched for: type "could not be resolved" "u_int32_t" "uint32_t"
but found nothing.
One other option could be to set-up a Docker with the same versions of g++ and libs than in 2013, but I want to move to recent compiler and libs for many reasons.
My conclusion is then to add #include <cstdint>
and replace u_int32_t
by uint32_t
everywhere. But I would like a confirmation What it is the right wayforward please ?