ros-perception / depthimage_to_laserscan

Converts a depth image to a laser scan for use with navigation and localization.
257 stars 173 forks source link

[Windows][ROS2] Fixed LNK1181: cannot open input file 'Release\DepthImageToLaserScan.lib' #39

Closed seanyen closed 5 years ago

seanyen commented 5 years ago

The imported library of DepthImageToLaserScan.lib is not generated since no functions are dllexport'd from DepthImageToLaserScan, consequently depthimage_to_laserscan-test fails to build when trying to link against it. Use WINDOWS_EXPORT_ALL_SYMBOLS to make every functions from DepthImageToLaserScan dllexport'd to fix it.

"C:\colcon_ws\build\depthimage_to_laserscan\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\colcon_ws\build\depthimage_to_laserscan\DepthImageToLaserScanROS.vcxproj" (default target) (4) ->
(Link target) -> 
  LINK : fatal error LNK1181: cannot open input file 'Release\DepthImageToLaserScan.lib' [C:\colcon_ws\build\depthimage_to_laserscan\DepthImageToLaserScanROS.vcxproj]

"C:\colcon_ws\build\depthimage_to_laserscan\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\colcon_ws\build\depthimage_to_laserscan\depthimage_to_laserscan-test.vcxproj" (default target) (5) ->
  LINK : fatal error LNK1181: cannot open input file 'Release\DepthImageToLaserScan.lib' [C:\colcon_ws\build\depthimage_to_laserscan\depthimage_to_laserscan-test.vcxproj]

    15 Warning(s)
    2 Error(s)
seanyen commented 5 years ago

@clalancette @chadrockey This is a fix for build breaks I noticed on Windows build. Hope you can take a look. Thanks!

seanyen commented 5 years ago

It seemed to me that the failing check Dpr__depthimage_to_laserscan__ubuntu_bionic_amd64 is not related to this change:

GNU C Compiler Warnings: 4 warnings.

DepthImageToLaserScanROS.cpp:55 | Normal | GNU C Compiler 4 (gcc) | Warning:deprecated-declarations
-- | -- | -- | --
DepthImageToLaserScanROS.cpp:60 | Normal | GNU C Compiler 4 (gcc) | Warning:deprecated-declarations
DepthImageToLaserScanROS.cpp:62 | Normal | GNU C Compiler 4 (gcc) | Warning:deprecated-declarations
DepthImageToLaserScanROS.cpp:102 | Normal | GNU C Compiler 4 (gcc) | Warning:deprecated-declarations
seanyen commented 5 years ago

Closed this one and in favor of #44.