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.

undefined reference to 'log'

Hi,

I am using ccsv5(linux version) for runtime debugging of omapl138lcdk.I am running a c-code which involves 'log' and 'sqrt'.Even though I included math.h header ,the following error message appears

undefined reference to 'log'

undefined reference to 'sqrt'

any help is appreciated.

Thanks in advance

-Stalin

  • Stalin,

    Header files are only part of the story, as they only declare the function but do not define it.

    Are you using GCC or TI ARM compilers? If TI ARM, these functions are defined in the runtime support library and you simply need to include it in your project. If GCC, you need to include the math library libm.a. Check this reference for details.

    If this is not your case, can you copy the build output to a text file and attach to this thread?

    Hope this helps,

    Rafael