This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

use c++ for nrf51 in keil

hello there i want to use c++ library in nrf51dk project. i am using sdk12. i change main.c to main.cpp but i am getting error.uart_original.rar

i have uploaded code here. In abc.cpp file i declared like

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>

#ifdef __cplusplus
extern "C" {
#endif

#include "app_uart.h"
#include "app_error.h"
#include "nrf_delay.h"
#include "nrf.h"
#include "bsp.h"

#ifdef __cplusplus
}
#endif

but i am getting compiler error. can you tell me how to solve it??

Related