简体   繁体   中英

convert program from x86 to x64

my boss ask me to pass one program to x64, but when I compile i get this error: mm3dnow.h(19): fatal error C1189: #error: This header is specific to X86 targets

I am very new in c++ and I don't know exactly what to change, I only want the program to work :,( and this is the header:

#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 */

Well, simply do not include any header files that are X86 specific (this includes recursive inclusion by other headers). If the code you want to port calls any methods declared in such files, you must dig deeper and replace them with appropriate functions that come with X64.

As you failed to provie any more details, I cannot give a more detailed answer, I'm afraid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM