I'm working with the c code in the dht library to control a DHT 11 with a raspberry pi using c++. However my code will not compile, it throws these errors:
pi_2_mmio.c:36:20: error: redefinition of 'volatile uint32_t* pi_2_mmio_gpio'
pi_2_mmio.h:34:20: error 'volatile uint32_t* pi_w_mmio_gpio' previously declared here
I looked at both files, pi_2_mmio.h declares the variable (pointer?) 'volatile uint32_t* pi_w_mmio_gpio' and pi_2_mmio.c assigns the value NULL to it......
why is the compiler reading the assignment statement as a second definition?
I'm using g++
please help!