1 Reply Latest reply on Jun 20, 2017 4:57 AM by rghe

    Using trigoniometry in FX3

    user_193279881

      Hello,

         

      I'm using FX3 example "USBBulkSourceSinkLED"

         

      and I want to fill my buffer with sine wave.

         

      If I add #include "math.h" and use x = sin(y)

         

      compiler tell me "undefined reference to 'sin'"

         

       

         

      Someone can help me ?

        • 1. Re: Using trigoniometry in FX3
          rghe

          Hi,

             

          Please do the following modifications to "USBBulkSourceSinkLED" example project:

             

          1. Right click on the "USBBulkSourceSinkLED" project and go to Properties.

             

          2. Go to C/C++ Build -> Settings.

             

          3. In the Tool Settings tab, go to ARM Sourcery Windows GCC C Linker -> Libraries.

             

          4. In the Libraries(-l) window, click on Add... menu and enter 'm' without quotes in the pop-up window and click OK.

             

          5. Click on Apply and Ok.

             

          6. Rebuild the project. Now, there won't be any linker errors.

             

          I have attached a snapshot of Properties window for your reference.