- #1
Lancelot59
- 646
- 1
I'm actually getting pretty frustrated with this now. It makes no sense.
I have this structure defined in detector.h
and the compiler is complaining that it has multiple definitions
This makes no sense. There is no mention of that structure anywhere else in the code. The individual values are only set to equal things of the same data type.
What does this error mean?
I have this structure defined in detector.h
Code:
//This structure contains all raw sensor data
struct sensor_data
{
//ADC Values For Each Sensor
int ADC_LOuter; //Outer Left Sensor
int ADC_LInner; //Inner Left Sensor
int ADC_Centre; //Centre Sensor
int ADC_RInner; //Inner Right Sensor
int ADC_ROuter; //Outer Right Sensor
//Whether or not the sensor is on the track
unsigned int Track_LOuter; //Outer Left Sensor
unsigned int Track_LInner; //Inner Left Sensor
unsigned int Track_Centre; //Centre Sensor
unsigned int Track_RInner; //Inner Right Sensor
unsigned int Track_ROuter; //Outer Right Sensor
};
struct sensor_data Sensor;
and the compiler is complaining that it has multiple definitions
Code:
MPLINK 4.22, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - symbol 'Sensor' has multiple definitions.
Errors : 1
This makes no sense. There is no mention of that structure anywhere else in the code. The individual values are only set to equal things of the same data type.
What does this error mean?
Last edited: