7 Replies Latest reply on Mar 5, 2020 4:48 AM by LePo_1062026

    Thanks for all the suggestions regarding array manipulations. Still having compiler problems, however


      Especially thanks to motoo tanaka for testing out my basic test program.  I simplified the test program even more, but still get compiler failure. This time I just took exactly what you wrote, but left out the printing part. The following is a copy, including the error messages. This should work. I just don't understand.



      #include "project.h"

      #include  "math.h"


      double   A=1.0;

      double   B=1.0;

      uint8_t n ;


      int main(void)  





           for (n = 1 ; n <= 10 ; n++)


                B = exp(5.0 / n) ;

                if (n == 10)


                      A = 1.0 ;

                      B = 1.0 ;



         }        *****this is the line number 22 that the error message refers to  


      /* [] END OF FILE */






      OK. So the messages I get are as follows:

                                      "collect2.exe: error: ld returned 1 exit status"


      It also said               " The command 'arm-none-eabi-gcc.exe' failed with exit code '1'. "


      It also said this in the notice list

                                              "build error: undefined reference to 'exp' line 22" (I marked line 22 so you could see what they were referring to. Don't know how to copy the listing with line numbers included)


      So how come this fails to compile  ?     Such a simple program.         As before, using psoc5lp board and creator version 3.3