This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX Kernel and stm32f10x_lib.h generates C++ compile error.

Building new firmware application using RTX Kernel and stm32f10x_lib.h generates error because library is not C++ compatible.

Development Board: STM3210E-EVAL
OS: RTX Kernel
Tools: uVision4

After creating a new uVision project for the STM3210E-EVAL board and a basic startup.cpp file a new compile-able project exits. Next, attempting to use the Keil STMicroelectronics include file and libraries causes compile errors. By specifiying the following in the startup.cpp file: “#include <stm32f10x_lib.h>” errors occur. They are:

C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error: #65: expected a ";"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {FALSE = 0, TRUE = !FALSE} bool;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): warning: #64-D: declaration does not declare anything
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: typedef enum {FALSE = 0, TRUE = !FALSE} bool;
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h: ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(401): warning: #368-D: class "<unnamed>" defines no constructor to initialize the following:
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::CPUID"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: {
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(467): warning: #368-D: class "<unnamed>" defines no constructor to initialize the following:
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::RESPCMD"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::RESP1"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::RESP2"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::RESP3"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::RESP4"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::DCOUNT"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::STA"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::FIFOCNT"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: {
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(515): warning: #368-D: class "<unnamed>" defines no constructor to initialize the following:
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: const member "<unnamed>::CALIB"
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: {
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ^
C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: startup.cpp: 4 warnings, 1 error

Why are the libraries and header file not C++ compatible. It is only natural to assume that someone would use RTX Kernel and C++ files.