ROBOTIS-GIT / hls_lfcd_lds_driver

ROS package for HLDS HLS-LFCD LDS driver

Home Page:http://turtlebot3.robotis.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install the driver on Windows

LichuanRen opened this issue · comments

Hi!

I am new to ROS and TurtleBot. I would like to use LDS-01 on Windows 10, but have problems when build the driver using nmake. Could anyone give suggestions on how to modify applications/lds_driver/Makefile, to make it work on Windows?

The errors I have:

Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30705 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '-L/usr/lib/x86_64-linux-gnu'
cl : Command line warning D9002 : ignoring unknown option '-lboost_system'
lds_driver.cpp
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:

  • add -D_WIN32_WINNT=0x0601 to the compiler command line; or
  • add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
    Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\ppltasks.h(1571): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    cl -o lds_driver lds_driver.o -I/usr/include -L/usr/lib/x86_64-linux-gnu -lboost_system
    Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30705 for x64
    Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-L/usr/lib/x86_64-linux-gnu'
cl : Command line warning D9002 : ignoring unknown option '-lboost_system'
cl : Command line warning D9024 : unrecognized source file type 'lds_driver.o', object file assumed
Microsoft (R) Incremental Linker Version 14.30.30705.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:lds_driver.exe
/out:lds_driver.exe
lds_driver.o
LINK : fatal error LNK1181: cannot open input file 'lds_driver.o'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.

=======================================

Thank you!