Yes, though if you are declaring a single function with C linkage you'd omit the braces and second externdsyleixa123 wrote: ↑Sat Sep 26, 2020 8:46 amSo what about thisPerhaps instead (what I can possibly suspect from Paeryn's post) something like, e.g.,Code: Select all
#ifdef __cplusplus extern "C" { extern int ads1115Setup (int pinBase, int i2cAddress) ; } #else extern int ads1115Setup (int pinBase, int i2cAddress) ; #endif
Code: Select all
extern "C" int ads1115Setup (int pinBase, int i2cAddress) ;