error : conflicting declaration for uint32_t

clouddy picture clouddy · May 24, 2014 · Viewed 9.4k times · Source

When I try to compile my program first I got this error:

error: ‘uint32_t’ does not name a type

Then I included

#include <stdint.h>

Now it turned out this error:

/include/stdint.h:52: error: conflicting declaration ‘typedef unsigned int uint32_t’

/cuda/include/vector_types.h:452: error: ‘uint32_t’ has a previous declaration as ‘typedef struct uint32_t uint32_t’

Any suggestion to solve this ? Thanks

Answer

Brian Bi picture Brian Bi · May 24, 2014

Try #include <cstdint> and std::uint32_t.