ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Catkin_make fails in ROS windows. roscpp.lib(roscpp.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

asked 2020-02-18 00:12:52 -0500

sunkingac4 gravatar image

updated 2022-01-22 16:10:21 -0500

Evgeny gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-18 10:30:46 -0500

OoeyGUI gravatar image

I noticed that the directory is VisualStudio2015, you'll need VS2019 to use ROS on Windows.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2020-02-18 00:12:52 -0500

Seen: 451 times

Last updated: Feb 18 '20