Author: EktaN_26 Version: **
Translation - Japanese: GCCツールチェーンを使用してPSoC Creatorプロジェクトに.aライブラリファイルを追加する - KBA227572- Community Translated (JA)
Before adding a static library file to PSoC Creator project, take note of the following:
- The static library file name must have a prefix “lib” and suffix ”.a”.
- Assembly files associated with the static library file must use softfpu. This is because PSoC Creator does not support hardfpu.
Do the following to add .a library file in PSoC Creator project using GCC toolchain:
- Go to Project > Build Settings > ARM GCC 5.4-2016-q2 update > Linker > General > Additional Libraries.
- In the Additional Libraries field, add the library name without the prefix “lib” and suffix “.a”. This is because GCC Compiler will automatically add “lib“ prefix to the library name.
For example: If you want to add “libmyfile.a” then you must write “myfile” in the Additional Libraries field as shown in the Figure 1 below.
Add the name of the folder where your static library file is stored in the Additional library Directories field.
If your static library file named as libmyfile.a is stored inside <ProjectName>.cydsn > location, add the folder path in Additional Library Directories.
Figure 1: Specifying the library file and directory
Note: If you want to run the project in both “Debug” and “Release” configurations, you need to add the .a library for both configurations.
Click on OK.