我在64位CentOS 6.x中构建C++项目时遇到了一些错误。该项目是在32位CentOS 6.x上成功构建的。虽然有一些关于这些类型的错误的线索,但我需要更多的澄清。错误是-
/usr/include/sys/types.h:198: error: conflicting declaration ‘typedef long int int64_t’
./Headers/PALsystypes.h:22: error: ‘int64_t’ has a previous declaration as ‘typedef long long int int64_t’
/usr/include/sys/types.h:204: error: conflicting declaration ‘typedef long unsigned int u_int64_t’
./Headers/PALsystypes.h:23: error: ‘u_int64_t’ has a previous declaration as ‘typedef long long unsigned int u_int64_t’还有更多类似下面的错误-
d5-x86_64.o md5-x86_64.s
md5-x86_64.s: Assembler messages:
md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement
md5-x86_64.s:50: Error: 0xe8c7b756 out range of signed 32bit displacement
md5-x86_64.s:68: Error: 0xc1bdceee out range of signed 32bit displacement
md5-x86_64.s:77: Error: 0xf57c0faf out range of signed 32bit displacement
md5-x86_64.s:95: Error: 0xa8304613 out range of signed 32bit displacement
md5-x86_64.s:104: Error: 0xfd469501 out range of signed 32bit displacement
md5-x86_64.s:122: Error: 0x8b44f7af out range of signed 32bit displacement
md5-x86_64.s:131: Error: 0xffff5bb1 out range of signed 32bit displacement请给我对这篇文章的任何反馈。
发布于 2013-01-25 14:13:16
typedef int foo;
typedef float foo;看,这是最小的例子,这与32或64位无关。
关于汇编程序的警告,考虑使用无符号整数,包括变量和常量(0x123u是无符号的)。
https://stackoverflow.com/questions/14516068
复制相似问题