简体   繁体   English

使用 arm-fsl-linux-gnueabi-gcc 编译:int64_t 为 32 位长

[英]Compiling with arm-fsl-linux-gnueabi-gcc: int64_t is 32 bit long

I'm cross compiling for imx28 cpu with arm-fsl-linux-gnueabi:我正在使用 arm-fsl-linux-gnueabi 交叉编译 imx28 cpu:

[vladimir@vladimir src]$ arm-fsl-linux-gnueabi-g++ -v
Using built-in specs.
Target: arm-fsl-linux-gnueabi
Configured with: /work/arm-toolchains/tmp/src/gcc-4.4.4/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/arm_fsl_gcc_4.4.4_multilib --with-sysroot=/work/arm_fsl_gcc_4.4.4_multilib/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion=4.4.4_09.06.2010 --enable-__cxa_atexit --disable-libmudflap --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-gmp=/work/arm-toolchains/tmp/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/arm-toolchains/tmp/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/arm-toolchains/tmp/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/arm-toolchains/tmp/arm-fsl-linux-gnueabi/build/static --enable-threads=posix --enable-target-optspace --with-local-prefix=/work/arm_fsl_gcc_4.4.4_multilib/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long --enable-multilib --with-system-zlib --enable-lto
Thread model: posix
gcc version 4.4.4 (4.4.4_09.06.2010) 

The following code line:以下代码行:

info->mask = 0xffffffffffffffff;

gives me following error:给我以下错误:

warning: integer constant is too large for 'long' type

I tried close to everything, made sure int64_t is defined to long long int, even tried to typedef it manually, still, it gives me the error.我尝试了一切,确保将 int64_t 定义为 long long int,甚至尝试手动对其进行 typedef,但它仍然给了我错误。

I also tried different -mcpu options.我还尝试了不同的 -mcpu 选项。

Is there even a way to use int64_t on imx28, or should I just give up?有没有办法在 imx28 上使用 int64_t,还是我应该放弃?

Based on your comment.根据您的评论。

Try 0xFFFFFFFFFFFFFFFFLL or -1尝试 0xFFFFFFFFFFFFFFFFLL 或 -1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 编译 gcc-7.3.0 时未找到 uint64_t 或 int64_t 错误 - uint64_t or int64_t not found error when compiling gcc-7.3.0 与 32 位和 64 位平台的 int64_t 匹配的整数文字? - Integer literal that matches int64_t for both 32-bit and 64-bit platforms? stdint 类型与原生类型:long 与 int64_t、int32_t - stdint types vs native types: long vs int64_t, int32_t 在32位系统上使用int64_t而不是int32_t会对性能产生什么影响? - what is the performance impact of using int64_t instead of int32_t on 32-bit systems? 是否可以将 long long returne 值分配给 int64_t 而不会丢失 64 位机器的精度? - Is it possible to assign long long returne value to int64_t without losing the precision in a 64-bit Machine? 32位系统上的64 int64_t的字节序 - Endianness of 64 int64_t on 32 bits systems 使用和何时使用 int16_t、int32_t、int64_t 和分别为 short int、int、long int、long - Uses and when to use int16_t,int32_t,int64_t and respectively short int,int,long int,long 函数msg(long)的候选函数msg(int32_t)和msg(int64_t)的模棱两可的重载 - Ambiguous overload of functions like `msg(long)` with candidates `msg(int32_t)` and `msg(int64_t)` 在32位Linux和64位Linux和MPFR上的long long int - long long int on 32-bit Linux vs 64-bit Linux and MPFR int64_t转换为“ long double”问题 - int64_t conversion to 'long double' issue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM