[英]Errors in building C++ project in CentOS 6.x 64 bit OS
I am facing some errors in building C++ project in 64 bit CentOS 6.x. 我在64位CentOS 6.x中构建C ++项目时遇到一些错误。 The project is been build successfully in 32 bit CentOS 6.x. 该项目已在32位CentOS 6.x中成功构建。 Though there are some threads about these types of errors, I need more clarification. 尽管关于这些类型的错误有一些线索,但我需要更多说明。 The errors are- 错误是-
/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’
And there are more errors like below- 而且还有更多类似以下的错误-
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
Please give me any feedback to this post. 请给我任何对此职位的反馈。
typedef int foo;
typedef float foo;
See, there's the minimal example and this has nothing to do with 32 or 64 bits. 瞧,有一个最小的例子,它与32位或64位无关。 The problem is that some header file declares symbols than another already declared and does so in an incompatible way. 问题在于某些头文件比其他已经声明的文件声明符号,并且这样做的方式不兼容。 I'd blame PALsystypes, which has no business declaring in particular int64_t, which should come from the system's stdint.h. 我要怪PALsystypes,它没有特别声明int64_t的业务,它应该来自系统的stdint.h。
Concerning the assembler warnings, consider using unsigned integers, both the variables and the constants (0x123u is unsigned). 关于汇编器警告,请考虑使用无符号整数,包括变量和常量(0x123u是无符号的)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.