DPP: Linker issue with functions implemented in C header files
Andre Pany
andre at s-e-a-p.de
Tue Feb 18 05:41:38 UTC 2020
Hi,
I try to get wrap the "Azure SDK for C" using DPP and have
following issue.
Functions, which are actually implemented in C header files will
cause
linker errors:
https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/core/core/inc/az_span.h#L91
Example:
AZ_NODISCARD AZ_INLINE az_span az_span_init(uint8_t * ptr,
int32_t length, int32_t capacity) {
return (az_span){ ._internal = { .ptr = ptr, .length = length,
.capacity = capacity, }, };
}
Error message:
/tmp/app.o:az_storage_blobs.d:function
_D20blobs_client_example__T19AZ_SPAN_FROM_BUFFERTG4096hZQBdFNbQnZS16az_storage_blobs7az_span: error: undefined reference to 'az_span_init'
I do not know C well, is this the expected behavior and should I
ask the Azure SDK developers to not implement functions within C
header files?
Kind regards
André
More information about the Digitalmars-d-learn
mailing list