Regarding Visual Studio (fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64') - visual-studio-2013

i am trying to use to user subroutines in Abaqus 6.14-2 version Software. For that i configured it by installing VS 2013 update 5 community version and Intel Parallel studio update 6 and it has passed the verification test in Abaqus.
But when i run my job, i get the following error : MSVCRT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

Seems like you are trying to use a library (obj file) which has been compiled as X86 module, but your project is targeted for 64bit OS. Consider switching target of your project to X64, in build settings. Or rebuilding used library for x64, if possible.

Related

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

I'm encountering a very frustrating error while trying to build OpenSSL on Windows 10. The error I get is
"lib" /nologo /out:providers\libdefault_static.lib #C:\Users\jcava\AppData\Local\Temp\nmF1AF.tmp
providers\common\libdefault-lib-bio_prov.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64
The steps I'm doing are running perl Configure VC-WIN64A then nmake both within the openssl directory that I cloned from Github. Im running all of this within a x64 command line prompt for VS 2019.
Cheers,
James
For x64 you have to run your perl Configure and nmake commands from
x64 Native Tools Command Prompt for VS 201x, not the Developer Command Prompt for VS 201x.
You can search for it in your Windows search bar. Make sure to right click it and run it in administrator mode.
If you've already compiled it incorrectly, you probably have to delete openssl and clone it again. Deleting the .obj files didn't solve it for me.
Source
I had similar problem. It means that there are some object files that have been compiled already using x86 (in this case). Perhaps you started off using the x86 compiler.
If you delete all the object files (type del /S *.obj in your openssl directory) then run nmake again it should compile fine.
Alternatively you could re-clone the repository and start again.

Using Visual Studio 2017 Developer Command Prompt native 64 bit to install openssl and getting error

When I use the developer command prompt for the native 64 bit of my computer to attempt to install openssl I get the error message LNK1112: module machine type 'x86' conflicts with target machine type 'x64'. When I check the path variable for the x64 developer command prompt all of locations for visual studio are x86. I'm not sure if that somehow got messed up or what it's supposed to be and googling for the past 5 hours was unhelpful.

Visual Studio 2015 cannot create Release builds for Cordova project

I am using Visual Studio 2015 for Cordova Tools to build an app that targets Windows Universal (UWP) and Android.
I can successfully create Debug builds for both Android and UWP, Release build works for Android as well.
However Visual Studio fails to create Release builds for UWP, none of the Windows-AnyCPU, Windows x86, Windows x64 and Windows ARM options works.
When creating Release builds for Windows-AnyCPU, the error message is like:
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(133,5): error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.NET.Native.Framework.1.2, Version=1.2". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM". [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(133,5): error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.NET.Native.Runtime.1.1, Version=1.1". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM". [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(248,5): error MSB4062: The "IlcErrorTask" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild with args: C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=release,/p:Platform=anycpu
1> Command finished with error code 2: cmd /s /c ""C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\cordova\build.bat" --release "--buildConfig=C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\build.json" --archs=anycpu --win"
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 2
When creating Release builds for Windows x86, Windows x64 or Windows ARM, the error message is like:
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(669,5): error MSB4062: The "SharedAssemblyApplicabilityVerifierTask" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(405,5): error MSB4062: The "ComputeManagedBinaries" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild with args: C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=release,/p:Platform=x64
1> Command finished with error code 2: cmd /s /c ""C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\cordova\build.bat" --release "--buildConfig=C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\build.json" --archs=x64 --win"
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 2
What confuses me is that all of these 4 configurations works fine with Debug builds.
Moreover, Visual Studio stops working when I try to associate the app with the Windows Store.
I am using:
Visual Studio Community 2015 Version 14.0.24720.00 Update 1
Visual Studio Tools for Apache Cordova 14.0.51016.1
Cordova CLI version
5.4.1
I've tried reinstalling Visual Studio, but it didn't work.
Thanks.
I spent hours struggling with this and was able to solve it finally by uninstalling Node 64 bit and installing 32 bit.
You can specify the architecture and the platform you want to build the Windows app in.
cordova build --release windows --appx=[platform] --archs=[architecture]
Options:
Platform: 8.1-win, 8.1-phone, uap
Architecture: x86, x64, arm
For Example:
cordova build --release windows --appx=uap --archs=arm
Reference: https://cordova.apache.org/docs/en/latest/guide/platforms/win8/
Visual Studio stops working when I try to associate the app with the Windows Store.
This is a bug that has just been fixed in Visual Studio 2015 Update 2. Here's a link to the installer: http://go.microsoft.com/fwlink/?LinkId=691129

Boost library error in Windows 7 64-bit

I have correctly compiled Boost for Windows 8 with VS-10 as given in this link. My project works fine. But when I copy the project to another Windows 7 machine it returns an error message as "The application was unable to start correctly (0xc000007b). Click OK to close this application.". I have correctly installed Boost in the second PC as well. Both PCs are 64-bit and I installed 32-bit Boost in both. As I found from some links this is because the project try dynamically linking 64-bit libraries instead 32-bit. Could you kindly advice how to build this as a portable solution. Thanks in advance.
Update 1:
Following is the dependency walker output.
Are you sure you selected the Visual Studio 2010 Command Prompt x86 to compile the library? or the x64 version? there is more than 1 version of the command prompt in the start menu. my guess would be that you accidentally ran the x64 version, and then compiled boost with it, resulting in a x64 bit version of the library compiled.
Here's a batch file that compiles the static and shared version of boost in x86:
compileboost.bat:
call "%vs110comntools%..\..\VC\vcvarsall.bat" x86
cd C:/boostsourcefolder/
call bootstrap.bat
.\b2 runtime-link=static
.\b2 runtime-link=shared
Then in your VS2010 project properties, Common Properties -> VC++ Directories -> Include Directories, type your boost folder (C:/boostsourcefolder/). and in Common Properties -> VC++ Directories -> Library Directories, type the boost compiled library folder (C:/boostsourcefolder/stage/lib/).
That's pretty much all you need to do.

cross compiling using visual studio 2005

I compiled a x64 application in win32 development environment.. When I run that binary in 64 bit intel machine , the following error is displayed
"The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail."..
In the event log it is mentioned that
"Activation context generation failed for . Dependent Assembly icrosoft.VC80.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0" could not be found. Please use sxstrace.exe for detailed diagnosis.
What is this issue and how to resolve this problem ?and architecture of the target system is amd64.
C:\>set | findstr /i amd64
PROCESSOR_ARCHITECTURE=AMD64
The error indicates, that you are trying to run a debug build on a machine that has no debug C runtime installed. The debug runtime is not redistributable, so your current application will only run on a machine with VS2005 installed.
To fix this issue, change the build flavour from Debug to Release and try again.
You also need to make sure, the lates C runtime libraries are available on the target machine. This page holds the lates VS2005 redistributable runtime installers for all supportet target platforms .

Resources