Article How to link static libraries in ARM core project

Question:
How to link static libraries in ARM core project.

Answer:
We can either use the –L and –l option to specify the path and name of the library to link against. For example, -L E:\Project\Griffin_ARM\CC\dlb1_Core0\Debug -ldlb1_Core0. The –l switch will add a `lib` prefix and '.a' suffix, so we don’t have to specify one.

To do this go to, project properties --> c/c++ build -->settings -->tool settings --> Cross core Arm bare metal C linker--> libraries --> library search directories(-L). Now add the library path here.

Then in Additional Libraries(-l), Give only the name of library (Note : no prefix(lib) and no extension(.a)).

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.