Catkin_make fails in ROS windows. roscpp.lib(roscpp.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Hi,
I have installed ROS in Windows 10 as "http://wiki.ros.org/Installation/Windows" for Visual Studio 2015. I have used "x64 Native Tools Command Prompt for VS 2015" tool.
I created the ROS command windows shortcut with
C:\Windows\System32\cmd.exe /k "C:\LegacyApp\VisualStudio2015\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 && set ChocolateyInstall=c:\opt\chocolatey&& c:\opt\ros\melodic\x64\setup.bat
For my source file, I need the roscpp, rosbag packages. When executing catkin_make, I am getting the below error.
C:\ROS_CATKIN>catkin_make
Base path: C:\ROS_CATKIN
Source space: C:\ROS_CATKIN\src
Build space: C:\ROS_CATKIN\build
Devel space: C:\ROS_CATKIN\devel
Install space: C:\ROS_CATKIN\install
####
#### Running command: "nmake cmake_check_build_system" in "C:\ROS_CATKIN\build"
####
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
####
#### Running command: "nmake" in "C:\ROS_CATKIN\build"
####
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
[ 50%] Built target _setup_util.py_executable_install_python
[ 75%] Linking CXX executable C:\ROS_CATKIN\devel\lib\blickfeld_viz\lidar_radar_viz.exe
LINK Pass 1: command "C:\LegacyApp\VisualStudio2015\VC\bin\link.exe /nologo @CMakeFiles\...
roscpp.lib(roscpp.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
NMAKE : fatal error U1077: 'C:\opt\python27amd64\Lib\site-packages\cmake\data\bin\cmake.exe' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: 'C:\LegacyApp\VisualStudio2015\VC\BIN\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\LegacyApp\VisualStudio2015\VC\BIN\nmake.exe' : return code '0x2'
Stop.
Invoking "nmake" failed
How to change the target machine type to x64? Is there any other steps to be done?