This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMDXSK437X: Multiple definition errors

Part Number: TMDXSK437X

Tool/software: TI C/C++ Compiler

I am getting multiple definition errors. One definition is the actual function and the "second" is always a an inline function. I have tried various optimization levels as well as the setting for putting functions into separate sections. (according to information i have searched on the ti website. Also mentioned was EABI.. is that relevant?) 
How do i get get rid of these "Multiple definition" errors?


any help would be much appreciated... thank you

(my apologies i already posted this in the Sitara Processors forum by mistake)

  • Samuel,

    Are you using gcc or the TI ARM compiler?

    Could you attach a screen shot?

    In this case do you have 2 functions of the same name a regular one and then another one declared in a header file as inline? If you could show the errors in the screen shot as well as the function declarations that would be great.

    Regards,
    John
  • Much appreciation.

    I'm using the gcc compiler 4.9.3

    The inline function is not of the same name but it is called from the function that is having the multiple definitions error...

    The attached screen shot is one example

  • Samuel Nesbitt said:
    The inline function is not of the same name but it is called from the function that is having the multiple definitions error...

    The code inside the problem function is of no concern.  Focus on the fact that you have somehow have two definitions (full implementations) of the function I2CSetDataCount.  The Problems view shows a truncated form of the diagnostic.  The full diagnostic is in the Console view.  It probably tells you where both implementations are located.  I suspect some project configuration error is at the root of the problem.

    Thanks and regards,

    -George

  • Samuel,

    Were you able to determine where the duplication was coming from by looking at the output in the Console view?

    John
  • Samuel,

    I am going to assume that you have found a solution for this and mark the thread as resolved. If you are still having an issue please feel free to post a new thread.

    Regards,
    John