The error you are getting:
XXXX.lib(XXXX.dll) : fatal error LNK1112: module machine type 'x64
conflicts with target machine type 'x86'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 12.0\VC\BIN\link.EXE?' : ? return code '0x458'
States that the makefile you are trying to build is targeted for platform type x86 but you are using a compiler which is x64.
There are 2 approaches which I came across:
THE FIRST APPROACH
(May only be relevant for versions VS2013 and above)
Open the VS2013 x86 Native Tools Command Prompt and execute the command there.
if you get the opposite message:
module machine type 'x86' conflicts with target machine type 'x64'
then you should open the VS2013 x64 Native Tools Command Prompt
Both tools can be found under the folder:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
THE SECOND APPROACH
(May only be relevant for versions prior to VS2013)
Since you are running the command from the Visual Studio developer command prompt you can see what compiler is running by executing the command
cl
This command will return the following line
Microsoft (R) C/C++ Optimizing Compiler Version [Compiler Version] for
[target platform]
Compiler Version: XX.XX.XXXXX
Target Platform: x64|x86
This will provide information regarding the version of the VS Compiler and the target platform.
You can change the target platform by running the following command:
"C:\Program Files (x86)\Microsoft Visual Studio
[VS Version]\VC\vcvarsall.bat [Target Platform]"
VS Version: 10.0|11.0|12.0|...
Target Platform: x86|amd64|x64|arm|x86_arm|x86_amd64|amd64_x86|amd64_arm|amd64_x86
*leaving the target platform empty will default to x86
In your case you would run the following command:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"