ros-perception / image_common

Common code for working with images in ROS

Home Page:http://www.ros.org/wiki/image_common

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ROS2] on windows, error when building

flynneva opened this issue · comments

this is probably from a missing dependency, but i'll go ahead and document the problem here for others/if anyone has encountered this problem before.

I get this error when running: colcon build

-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- Found ament_cmake_python: 0.9.8 (C:/opt/ros/foxy/x64/share/ament_cmake_python/cmake)
-- Found ament_cmake_ros: 0.9.0 (C:/opt/ros/foxy/x64/share/ament_cmake_ros/cmake)
-- Using PYTHON_EXECUTABLE: C:/opt/ros/foxy/x64/python.exe
-- OpenCV ARCH: x64
-- OpenCV RUNTIME: vc16
-- OpenCV STATIC: OFF
-- Found OpenCV 3.4.6 in C:/opencv/x64/vc16/lib
-- You might need to add C:\opencv\x64\vc16\bin to your PATH to be able to run your applications.
-- Found sensor_msgs: 2.0.3 (C:/opt/ros/foxy/x64/share/sensor_msgs/cmake)
-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c
-- Found rosidl_adapter: 1.2.0 (C:/opt/ros/foxy/x64/share/rosidl_adapter/cmake)
-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp
-- Found gtest sources under 'C:/opt/ros/foxy/x64/src/gtest_vendor': C++ tests using 'Google Test' will be built
-- Configuring done
-- Generating done
-- Build files have been written to: D:/code/ros/rolling/build/image_geometry
Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

     Creating library D:/code/ros/rolling/build/image_geometry/Release/image_geometry.lib and object D:/code/ros/rolling/build/image_geometry/Release/image_geometry.exp
pinhole_camera_model.obj : error LNK2019: unresolved external symbol "void __cdecl cv::error(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *,char const *,int)" (?error@cv@@YAXHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD1H@Z) referenced in function "public: __cdecl cv::Mat::Mat(int,int,int,void *,unsigned __int64)" (??0Mat@cv@@QEAA@HHHPEAX_K@Z) [D:\code\ros\rolling\build\image_geometry\image_geometry.vcxproj]
D:\code\ros\rolling\build\image_geometry\Release\image_geometry.dll : fatal error LNK1120: 1 unresolved externals [D:\code\ros\rolling\build\image_geometry\image_geometry.vcxproj]
  gtest.vcxproj -> D:\code\ros\rolling\build\image_geometry\gtest\Release\gtest.lib
  gtest_main.vcxproj -> D:\code\ros\rolling\build\image_geometry\gtest\Release\gtest_main.lib

added a cmake message print to check what the opencv libraries variable was set to and re-ran the build

-- openCV libraries cmake variable: opencv_calib3d;opencv_core;opencv_highgui;opencv_imgproc

things are looking ok there...

...whoops wrong repo