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 -0600

sunkingac4 gravatar image

updated 2020-02-18 07:01:48 -0600

gvdhoorn 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 -0600

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

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

Seen: 328 times

Last updated: Feb 18 '20