Without seeing your code it's very hard to answer. I guess the code does not include cstdint
or stdint.h
, and/or it is not using the std::uint64_t
syntax.
So my answer can only be a simple test/example you can run.
Compile it with:
g++ -Wall -g --std=c++11 int64_test.cpp -o int64_test -lstdc++
The Code "int64_test.cpp":
#include <cstdint>
#include <iostream>
int main( int argc, char **argv )
{
std::uint64_t u64 = 3;
std::int32_t i32 = 141;
std::cout << "u64 = " << u64 << std::endl;
std::cout << "i32 = " << i32 << std::endl;
return 0;
}
This code & compilation works fine on Ubuntu 18.04. I expect it will also work on Ubuntu 14.x
For the sake of completeness, a C version (since this is(was) tagged into the question too)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h> // Must have this!
int main( int argc, char **argv )
{
uint64_t u64 = 3;
int32_t i32 = 141;
printf( "u64 = %lu\n", u64 );
printf( "i32 = %d\n", i32 );
return 0;
}