This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Newbie: how to link libraries?

Dear all,

This is my first project in Keil uVision and I have also little experience with embedded design. I would like to simulate some DSP code written in C++ on STM32F4 Discovery board.
The code contains a lot of functions - sin, cos, sqrt, log, exp etc and includes the corresponding c++ libraries cmath, cfloat. What should I do to be able to use these functions?

I have tried to specify the following library paths in Options for Target -> C/C++ -> Include paths

"C:\Keil_v5\ARM\ARMCC\lib";"C:\Keil_v5\ARM\ARMCC\include"

But get an error message for every use of these functions, which looks like:

BlkDsp.cpp(491): error: #20: identifier "cos" is undefined c1 = 2.0*cos(tmp); c2 = sin(tmp);

Sorry for my little knowledge. I will be thankfull for any hint!

Parents
  • library != include

    An include file describes the interface, a library provides the code.

    #include <math.h> // ??

    You'd want to double check what libraries/options you have set up in the project, like if you have full math libraries or floating point support enabled. In some cases you'd drop a .A or .LIB file directly into the project.

Reply
  • library != include

    An include file describes the interface, a library provides the code.

    #include <math.h> // ??

    You'd want to double check what libraries/options you have set up in the project, like if you have full math libraries or floating point support enabled. In some cases you'd drop a .A or .LIB file directly into the project.

Children