the other one in the thread that you gave is: 1>.\Debug\TheTest.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
so how's that? |
A particular Visual Studio project can be built to multiple
configurations. Say, for instance that you want to have a
Debug build for testing and a
Release build for deployment, you would simply build once under the
Debug configuration and once under the
Release configuration. Each .exe would be built to separate directories and you wouldn't have to change the code in the process. Visual Studio has these two configurations available for every project, though you can add your own configurations. You can make one configuration use a particular set of pre-processor directives, and you could have another which uses a different run-time library, for example.
A Visual Studio project can be built to multiple
platforms. For instance, you can build the same project for use on an 'x86' processor (and give it to Win32 customers) and for use on an 'x64' processor (and give it to Windows customers with a 64 bit OS). Depending on your machine and Visual Studio installation, you can build for other platforms such as an Itanium processor.
You can see the current configuration and platform at the top of the main GUI in Visual Studio, and you can change them in the drop down list or in the configuration manager. Each configuration/platform combination has its own project properties. This is needed so that the options you set for one (for instance, the build directory) don't conflict with the options set for another.
The error you quoted above is because in the project properties there is a property under
Linker -> Advanced -> Target Machine that must not conflict with the target
platform. That poster was trying to build for the x64 platform, but the target machine property was set to x86. Setting the target machine to x64 would fix the error.
According to MSDN:
MSDN wrote: |
---|
Usually, you do not need to specify the /MACHINE option. LINK infers the machine type from the .obj files. However, in some circumstances, LINK cannot determine the machine type and issues a linker tools error LNK1113. If such an error occurs, specify /MACHINE. |
now here's the error in my app.
1>c:\users\bahay\documents\visual studio 2010\Projects\waa\Debug\waa.exe : fatal error LNK1120: 1 unresolved externals |
This error is given because the linker can't find a certain symbol (such as a variable or function). I hope it's not because of
<iostream>
. That error should be reported along with a list of the symbols that's giving the linker trouble (LNK2001). Can you show your full code, along with the (1) other linker error? How did you set up your project (did you do empty project or Win32 console)?