1 Reply Latest reply on Jul 22, 2020 9:25 PM by JayakrishnaT_76

    pow() function does not work in Eclipse EZ USB suite for fx3 project

    dach_3214351

      Hi All,

       

      I want to use pow() function to calcuate value. but compile is faild

       

      code\USBBulkLoopAuto\Debug/../dsplib.c:81: undefined reference to `pow'

       

      How can i  fix this proble ?

       

      Thanks,

       

      Darren

        • 1. Re: pow() function does not work in Eclipse EZ USB suite for fx3 project
          JayakrishnaT_76

          Hello,

           

          Please include math.h at the beginning of the source file where you want to use pow() function. The code for the same is given below:

           

          #include "math.h"

           

          After this is done, please do the following steps:

          1. Open project properties. This can be done by right clicking on the project (in the project explorer) and then choosing properties.

          2. Under C/C++ build, select Settings.

          3. Under Cross ARM C Linker, select Libraries. The snapshot of the default libraries is shown below:

           

          4. Add a new library (m) to the set of default libraries present. The snapshot of adding the new library is shown below:

           

          Once this is done, hit OK and the new library will be added to the default libraries used for the project. Please find the snapshot below with the new library added to the default libraries.

           

           

          Now press OK. Then refresh the project and try building it again. I used the same steps and could successfully build the project at my end and find powers. Please let me know if you face any issues at your end.

           

          Best Regards,

          Jayakrishna