open62541: error: ‘UA_SOCKET’ does not name a type;


Description

I have a compilation error when I compile open62541-master with C++ compilator 👍 [ 33%] Building CXX object CMakeFiles/openLoki.dir/fabrique.cpp.o /usr/bin/c++ -I/home/idevice/OpenLoki/…/open62541-master -o CMakeFiles/openLoki.dir/fabrique.cpp.o -c /home/idevice/OpenLoki/fabrique.cpp In file included from /home/idevice/OpenLoki/fabrique.h:6:0, from /home/idevice/OpenLoki/fabrique.cpp:9: /home/idevice/OpenLoki/…/open62541-master/open62541.h:21300:5: error: ‘UA_SOCKET’ does not name a type UA_SOCKET sockfd; /* Most connectivity solutions run on ^ /home/idevice/OpenLoki/…/open62541-master/open62541.h:25644:17: error: ‘UA_SOCKET’ was not declared in this scope ssize_t UA_send(UA_SOCKET sockfd, const void *buf, size_t len, int flags); //equivalent to posix send implementation ^

Background Information / Reproduction Steps

Checklist

Please provide the following information:

  • open62541 Version (release number or git tag): Master
  • Other OPC UA SDKs used (client or server): Client
  • Operating system: Linux Debian 8
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • Self-contained code example attached
  • Critical issue

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hello all,

can we assume an architecture by default? In CMake as well as the amalgamated single-file distribution.

#ifdef _WIN32
#define UA_ARCHITECTURE_WIN32
#else
#define UA_ARCHITECTURE_POSIX.
#endif

Otherwise, many existing build setups will suddenly break. That’s not good.