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

multiple definition of "something" Segger

Hello every one.

I am new with Segger and nRF52.

I tried to create my own library for OB1203 sensor.

But i stack here when Segger view this error:

Output/blinky_pca10040_s132 Release/Obj/OB1203.o:C:\Users\dang\Desktop\OB1203v1\examples\peripheral\blinky\pca10040\s132\ses/../../../../../../modules/nrfx/drivers/include/OB1203.h:195: multiple definition of `osc_trim'; Output/blinky_pca10040_s132 Release/Obj/main.o:C:\Users\dang\Desktop\OB1203v1\examples\peripheral\blinky\pca10040\s132\ses/../../../../../../modules/nrfx/drivers/include/OB1203.h:195: first defined here
Below is my screen shoot

I believe the way i put OB1203.h and OB1203.c is wrong, that is not relate to Segger or nRF52 but i can not find where it wrong. 

Please help me.

Thank you for any support

Parents Reply
  • Hi Simon, thank you for support me.

    Finally, i solve that trouble by moving variable "osc_trim" to OB1203.c and there are no error so far.

    I think that is not good way to solve the trouble, but i still not understand why it happened.

    If possible, please continues help me find root of that trouble. 

    "How have you added the header file to your project?" yes, i understand how do Segger manager file. I added .h file already.

Children
No Data
Related