VitalyS83 opened a new issue, #17473: URL: https://github.com/apache/nuttx/issues/17473
### Description / Steps to reproduce the issue In the _spi_transfer.h_ header file, https://github.com/apache/nuttx/blob/c38042941fe984a7f89d3be68b410862c5b54398/include/nuttx/spi/spi_transfer.h#L163, the declaration of spi_register() function is not wrapped into extern "C" directives. ``` #ifdef CONFIG_SPI_DRIVER int spi_register(FAR struct spi_dev_s *spi, int bus); #endif ``` Therefore, when one tries to use spi_register() from within C++ source code file, linker does not find this function because it seeks for its mangled name, which is not present in the collection of nuttx object file which is provided to linker during link process. To reproduce, one can just create any C++ source file, add it to the CXXSRCS variable in Make file, and attempt to invoke spi_register() from it. It should be wrapped inside **extern "C"** directives ### On which OS does this issue occur? [OS: Linux] ### What is the version of your OS? Linux Debian ### NuttX Version master, 12.12, and previous versions ### Issue Architecture [Arch: all] ### Issue Area [Area: Drivers] ### Host information _No response_ ### Verification - [x] I have verified before submitting the report. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
