open62541: 'NO_ERROR' undeclared - OPC server - C

0

I am trying to create an OPC server via open62541 following the example of this link, page 15: link

When trying to compile with:

gcc -std=c99 open62541.c myServer.c -lws2_32 -o myServer.exe

I get the following error messages:

open62541.c: In function 'socket_set_nonblocking':
open62541.c:38483:48: error: 'NO_ERROR' undeclared (first use in this function)
 if(ioctlsocket(sockfd, FIONBIO, &iMode) != NO_ERROR)
                                            ^~~~~~~~
open62541.c:38483:48: note: each undeclared identifier is reported only once for each function it appears in
open62541.c: In function 'socket_set_blocking':
open62541.c:38501:48: error: 'NO_ERROR' undeclared (first use in this function)
 if(ioctlsocket(sockfd, FIONBIO, &iMode) != NO_ERROR)
                                            ^~~~~~~~
open62541.c: In function 'addServerSocket':
open62541.c:38637:42: error: 'IPV6_V6ONLY' undeclared (first use in this function)
    setsockopt(newsock, IPPROTO_IPV6, IPV6_V6ONLY,
                                      ^~~~~~~~~~~
open62541.c: In function 'UA_DateTime_localTimeUtcOffset':
open62541.c:39253:5: warning: implicit declaration of function 'gmtime_s'     [-Wimplicit-function-declaration]
     gmtime_s(&ptm, &rawtime);
    
asked by anonymous 18.04.2018 / 23:16

0 answers