在64位平台上使用交叉编译器构建错误32位.exe

时间:2022-04-07 02:20:03

I was able to build 64 bit .exe using cross compiler path on 64 bit platform as below C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN \x86_amd64;

我能够在64位平台上使用交叉编译器路径构建64位.exe,如下所示C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ BIN \ x86_amd64;

But when I tried to build 32 bit .exe using same path and on same 64 bit platform. I am getting an error like below,

但是当我尝试使用相同的路径并在相同的64位平台上构建32位.exe时。我收到如下错误,

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

致命错误LNK1112:模块机器类型'x64'与目标机器类型'X86'冲突

I think it may be possible to build 32 bit .exe using 32 bit path as below C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN, But if I try to build with 32 bit path I may get TrackFileAccess Error.

我认为有可能使用32位路径构建32位.exe,如下所示C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ BIN,但如果我尝试使用32位路径构建,我可能会获得TrackFileAccess错误。

Can I know any solution how to build 32 bit .exe using cross compiler on 64 bit platform

我能否知道如何在64位平台上使用交叉编译器构建32位.exe的任何解决方案

Thanks&Regards, Deva P

感谢和问候,Deva P.

1 个解决方案

#1


0  

The error means you're trying to link an x64 built lib into your x86 program. Check your linker Additional Library Directories paths are set to the right location (i.e. 64 bit versions), and that any libraries you're building yourself have the right build configuration set.

该错误意味着您正在尝试将x64构建的lib链接到x86程序中。检查链接器其他库目录路径设置为正确的位置(即64位版本),并且您自己构建的任何库都具有正确的构建配置集。

#1


0  

The error means you're trying to link an x64 built lib into your x86 program. Check your linker Additional Library Directories paths are set to the right location (i.e. 64 bit versions), and that any libraries you're building yourself have the right build configuration set.

该错误意味着您正在尝试将x64构建的lib链接到x86程序中。检查链接器其他库目录路径设置为正确的位置(即64位版本),并且您自己构建的任何库都具有正确的构建配置集。