将程序从x86转换为x64

  • 本文关键字:x64 转换 x86 程序 c++
  • 更新时间 :
  • 英文 :


我的老板要求我将一个程序传递给x64,但是当我编译时出现此错误: mm3dnow.h(19(: 致命错误 C1189: #error:此标头特定于 X86 目标

我对c ++很陌生,我不知道要更改什么,我只希望程序正常工作:,( 这是标题:

#pragma once

#if !defined(_M_IX86)
#error This header is specific to X86 targets
#endif
#ifndef _MM3DNOW_H_INCLUDED
#define _MM3DNOW_H_INCLUDED
#ifndef __midl

#if !defined _M_IX86
#error This header is specific to the X86 target
#endif

#include <vcruntime.h>
#include <mmintrin.h>
#include <xmmintrin.h>

#if defined __cplusplus
extern "C" { /* Intrinsics use C name-mangling.  */
#endif  /* defined __cplusplus */
/* 3DNOW intrinsics */
void _m_femms(void);
__m64 _m_pavgusb(__m64, __m64);
__m64 _m_pf2id(__m64);
__m64 _m_pfacc(__m64, __m64);
__m64 _m_pfadd(__m64, __m64);
__m64 _m_pfcmpeq(__m64, __m64);
__m64 _m_pfcmpge(__m64, __m64);
__m64 _m_pfcmpgt(__m64, __m64);
__m64 _m_pfmax(__m64, __m64);
__m64 _m_pfmin(__m64, __m64);
__m64 _m_pfmul(__m64, __m64);
__m64 _m_pfrcp(__m64);
__m64 _m_pfrcpit1(__m64, __m64);
__m64 _m_pfrcpit2(__m64, __m64);
__m64 _m_pfrsqrt(__m64);
__m64 _m_pfrsqit1(__m64, __m64);
__m64 _m_pfsub(__m64, __m64);
__m64 _m_pfsubr(__m64, __m64);
__m64 _m_pi2fd(__m64);
__m64 _m_pmulhrw(__m64, __m64);
void _m_prefetch(void*);
void _m_prefetchw(volatile const void*_Source);
__m64 _m_from_float(float);
float _m_to_float(__m64);
/* Athlon DSP intrinsics */
__m64 _m_pf2iw(__m64);
__m64 _m_pfnacc(__m64, __m64);
__m64 _m_pfpnacc(__m64, __m64);
__m64 _m_pi2fw(__m64);
__m64 _m_pswapd(__m64);
#if defined __cplusplus
}; /* End "C" */
#endif  /* defined __cplusplus */
#endif  /* __midl */
#endif  /* _MM3DNOW_H_INCLUDED */

好吧,简单地不包含任何特定于 X86 的头文件(这包括其他标头的递归包含(。如果要移植的代码调用此类文件中声明的任何方法,则必须深入挖掘并将它们替换为 X64 附带的相应函数。

由于你没有提供更多的细节,恐怕我无法给出更详细的答案。

最新更新