xArm-Developer / xArm-CPLUS-SDK

C++ SDK for UFACTORY robots, 850, xArm5/6/7, and Lite6.
https://www.ufactory.cc/
BSD 3-Clause "New" or "Revised" License
44 stars 29 forks source link

Undefined Windows macros cause 'make' error on Linux (Ubuntu 16.04) #1

Closed jdsl-software closed 4 years ago

jdsl-software commented 4 years ago

xArmCPLUSerror

I have managed to build the SDK successfully after defining the Windows macros in include/xarm/wrapper/xarm_wrapper.h:

#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
   #define __declspec(dllexport)
   #define __stdcall
#endif

Successful build tested in Docker as well (Ubunutu 16.04 with ROS kinetic image). I have not tested the SDK functionality and can't guarantee this fix has not affected it.

jdsl-software commented 4 years ago

I noticed xarm_wrapper.h has been removed (along with any call to declspec(dllexport) and stdcall). The C++ SDK library can now be built on linux directly from source without issues. So I will close this issue.