fix build with readable objects (#622)

When building the stack with readable objects, the
My_Read_Property_Multiple_Ack_Handler function defined in
src/bacnet/basic/client/bac-rw.c calls rpm_ack_object_property_process
which is defined in src/bacnet/rpm.h but unreachable without
BACNET_STACK_EXPORT.

How to reproduce the bug:

$ mkdir build
$ cd build/
$ cmake -DCMAKE_C_FLAGS="-DMAX_ANALOG_INPUTS=100"  ..
$ make
...
[ 81%] Linking C executable bacpoll
/usr/bin/ld: CMakeFiles/bacpoll.dir/src/bacnet/basic/client/bac-rw.c.o: in function `My_Read_Property_Multiple_Ack_Handler':
bac-rw.c:(.text+0x188): undefined reference to `rpm_ack_object_property_process'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/bacpoll.dir/build.make:146: bacpoll] Error 1
make[1]: *** [CMakeFiles/Makefile2:523: CMakeFiles/bacpoll.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
This commit is contained in:
antocout
2024-04-22 15:17:19 +02:00
committed by GitHub
parent f929a10ad2
commit 6e31a01086
+1
View File
@@ -195,6 +195,7 @@ extern "C" {
unsigned apdu_len,
BACNET_PROPERTY_ID * object_property,
BACNET_ARRAY_INDEX * array_index);
BACNET_STACK_EXPORT
void rpm_ack_object_property_process(
uint8_t *apdu,
unsigned apdu_len,