简体   繁体   English

在CentOS 6.x 64位OS中构建C ++项目时出错

[英]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.

相关问题 CentOS 6.02 64位操作系统中的OpenSSL构建错误 - OpenSSL building errors in CentOS 6.02 64 bit OS 在64位CPU上的C ++中的Mac OS X上,是否有64位的类型? - On Mac OS X in C++ on a 64-bit CPU, is there a type that is 64 bits? 为什么我在 32 位 Mac OS X 系统上看到 C++ 中的 64 位指针? - Why do I see 64-bit pointers in C++ on my 32-bit Mac OS X system? 如何将C ++项目从32位迁移到64位以支持MAC OS 10.14(Mojave)? - How to migrate C++ project from 32-Bit to 64-Bit to support MAC OS 10.14(Mojave)? 出于愚蠢的原因,无法在OS X的Eclipse CDT中构建c ++项目 - Having trouble building c++ project in Eclipse CDT in OS X for a silly reason 在 OSx 上使用 CMake 构建 C++ 项目:ld:未找到架构 x86_64 的符号 - Building a C++ project with CMake on OSx: ld: symbol(s) not found for architecture x86_64 用C ++ dll 64位编译我的32位项目 - Compile my 32 bit project with C++ dll 64 bit 从c / c ++应用程序确定32位操作系统还是64位操作系统 - determine 32-bit OS or 64-bit OS from c/c++ application 在 Windows 上使用 cmake 构建 x86(32 位)项目时使用 64 位 python3 解释器 - Use 64 bit python3 interpreter when building x86 (32 bit) project with cmake on Windows 在OS X中构建和安装MongoDB C ++驱动程序 - Building and installing MongoDB C++ driver in OS X
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM