0
$\begingroup$

Rosanswers logo

Hi, I am totally new to ROS and I am trying to make this tutorial happen in Unreal Engine(4.14): http://wiki.ros.org/rosserial_windows/Tutorials/Receiving%20Messages

However, I got a lot of errors when I tried to compile ros.h in Unreal. I am using VS2015.

Please let me know if you know what happened. Thanks in advance!

The error log is followed:

Error C2575 'deserialize': only member functions and bases can be virtual TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 43
Error C2660 'memcpy': function does not take 2 arguments TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 37
Error C3646 'req_param_resp': unknown override specifier TrafficProject d:\unreal projects\trafficproject\source\ros_lib\ros\node_handle.h 490 Error C2448 'rosserial_msgs::msg': function-style initializer appears to be a function definition TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 26
Error C2270 'serialize': modifiers not allowed on nonmember functions TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 30
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 32
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 33
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 34
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 37
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 45
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 46
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 54
Error C2447 '{': missing function header (old-style formal list?) TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\RequestParam.h 9
Error Failed to produce item: D:\Unreal Projects\TrafficProject\Binaries\Win64\UE4Editor-TrafficProject-4209.dll TrafficProject D:\Unreal Projects\TrafficProject\Intermediate\ProjectFiles\ERROR 1
Error C2227 left of '->level' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 32
Error C2227 left of '->level' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 33
Error C2227 left of '->level' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 45
Error C2227 left of '->level' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 46
Error C2227 left of '->msg' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 34
Error C2227 left of '->msg' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 37
Error C2227 left of '->msg' must point to class/struct/union/generic type TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 54
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 24
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 25
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int TrafficProject d:\unreal projects\trafficproject\source\ros_lib\ros\node_handle.h 490 Error C2059 syntax error: ')' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 23
Error C2059 syntax error: 'constant' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 20
Error C2059 syntax error: '}' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 64
Error C2143 syntax error: missing ';' before '{' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\RequestParam.h 9
Error C2143 syntax error: missing ';' before '}' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 20
Error C2143 syntax error: missing ';' before '}' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 64
Error MSB3073 The command ""D:\Unreal Engine\UE_4.14\Engine\Build\BatchFiles\Rebuild.bat" TrafficProjectEditor Win64 Development "D:\Unreal Projects\TrafficProject\TrafficProject.uproject" -waitmutex" exited with code -1. TrafficProject C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 46
Error C2238 unexpected token(s) preceding ';' TrafficProject D:\Unreal Projects\TrafficProject\Source\ros_lib\rosserial_msgs\Log.h 20


Originally posted by 116Exia on ROS Answers with karma: 16 on 2017-06-05

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ok I figured it out: It is the def conflict of "ERROR" between log.h and wingdi.h. I just undef the "ERROR" in log.h and it works fine.


Originally posted by 116Exia with karma: 16 on 2017-06-06

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.