The error message looks something like this in decentralized coordination after compilation:
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/../include/core/federated/net_util.h:100:9: note: previous declaration is here
ssize_t read_from_socket(int socket, size_t num_bytes, unsigned char* buffer);
^
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:101:37: error: use of undeclared identifier 'NUM_SOCKET_RETRIES'
if (more < 0 && retry_count++ < NUM_SOCKET_RETRIES && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) {
^
Application_Example/V2I/fed-gen/STA_Testing/src-gen/federate__lamppost/core/federated/clock-sync.c:217:5: error: call to undeclared function 'read_from_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
read_from_socket_fail_on_error(rti_socket_TCP, message_size, buffer, NULL,
^
1 error generated.
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:105:16: error: use of undeclared identifier 'DELAY_BETWEEN_SOCKET_RETRIES'
lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES);
^
make[2]: [core/CMakeFiles/reactor-c.dir/federated/clock-sync.c.o] Error 1
make[2]: Waiting for unfinished jobs....
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/federate.c:119:3: error: call to undeclared function 'write_to_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex,
^
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/federate.c:146:3: error: call to undeclared function 'write_to_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex,
^
/Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:143:7: error: call to undeclared function 'lf_mutex_unlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
LF_MUTEX_UNLOCK(mutex);
^
Such an issue could be resolved by removing the fed-gen folder with the following command:rm -rf fed-gen. After that, you just need to compile your program again, and it should work.
The error message looks something like this in decentralized coordination after compilation: /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/../include/core/federated/net_util.h:100:9: note: previous declaration is here ssize_t read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); ^ /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:101:37: error: use of undeclared identifier 'NUM_SOCKET_RETRIES' if (more < 0 && retry_count++ < NUM_SOCKET_RETRIES && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { ^ Application_Example/V2I/fed-gen/STA_Testing/src-gen/federate__lamppost/core/federated/clock-sync.c:217:5: error: call to undeclared function 'read_from_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] read_from_socket_fail_on_error(rti_socket_TCP, message_size, buffer, NULL, ^ 1 error generated. /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:105:16: error: use of undeclared identifier 'DELAY_BETWEEN_SOCKET_RETRIES' lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); ^ make[2]: [core/CMakeFiles/reactor-c.dir/federated/clock-sync.c.o] Error 1 make[2]: Waiting for unfinished jobs.... /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/federate.c:119:3: error: call to undeclared function 'write_to_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex, ^ /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/federate.c:146:3: error: call to undeclared function 'write_to_socket_fail_on_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex, ^ /Application_Example/V2I/fed-gen/STA_Testing/src-gen/federatelamppost/core/federated/network/net_util.c:143:7: error: call to undeclared function 'lf_mutex_unlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] LF_MUTEX_UNLOCK(mutex); ^
Such an issue could be resolved by removing the fed-gen folder with the following command:rm -rf fed-gen. After that, you just need to compile your program again, and it should work.