Closed Brabalawuka closed 5 years ago
Since this happens on Windows I will add @kejxu to the ticket.
@Brabalawuka please include more information: what you are doing, exact steps, versions, environment, etc.
I have solved this issue through a large number of configuration works and I will post how I solved it tmr morning i am in GMT+8
I have solved this issue through a large number of configuration works
using Visual Studio for ROS projects would likely require proper configuration of include paths for most dependencies other than STL and platform apis (windows.h). Good to know you were able to get around with it!
@kejxu @dirk-thomas Thanks for your reply!
In the CMakeSettings.json
file, do the following:
->>"generator": "NMake Makefiles"
->> This because Catkin_make
uses NMake
instead of Ninja
->>"configurationType": "RelWithDebInfo"
->> Match with Catkin Type
->>"buildRoot": "C:\\catkin_ws\\build"
->> Change build root to your own workspace folder (refer to you solution penal on the right side)
->>"installRoot": "C:\\catkin_ws\\install"
->> Change install root to your own workspace folder (refer to you solution penal on the right side)
->>"cmakeCommandArgs": "DCATKIN_DEVEL_PREFIX=C:\\catkin_ws\\devel"
->> Change develpment root to your own workspace folder (refer to you solution penal on the right side)
->>"buildCommandArgs": "-v"
->>"cmakeExecutable": "C:/opt/rosdeps/x64/bin/cmake.exe"
->> Add this line to use ROS default cmake instead of vs one to avoid confusing errors.
Refer to following pictures:
These could probably sove those intellisense errors and can successfully compile and run.
Generating cmake cache would result in command line error like this:
E0992 command-line error: invalid macro definition: =
It does not mention where this
=
is located but in the cpp code it locates at the very begining in line 1.However I dont see any error on the command line preprocessor