Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

Rile_3376121
Level 1
First like received First like given
Level 1

Hi,

I have a third party library provided as a pre-compiled binary file with ".a" extension.

How to link the precompiled .a file library in PSoc Creator 4.2?

Thank you

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator First comment on KBA First comment on blog 5 questions asked
Moderator

Go to Project > Build Settings > ARM GCC 5.4-2016-q2-update > Linker > General > Additional Libraries >

Then specify the filename without specifying the prefix lib and .a extension.  For example, "libsampleFile.a" will be written as "sampleFile" as shown below:

addlib_1.png

This is because GCC will automatically add "lib" prefix to the library name.

Also, add the path to the directory which contains the file in the "Additional Library Directories" seen in the figure.

Now build your project and your file library will get linked with PSoC Creator.

Regards,

Dheeraj

View solution in original post

2 Replies
DheerajK_81
Moderator
Moderator First comment on KBA First comment on blog 5 questions asked
Moderator

Go to Project > Build Settings > ARM GCC 5.4-2016-q2-update > Linker > General > Additional Libraries >

Then specify the filename without specifying the prefix lib and .a extension.  For example, "libsampleFile.a" will be written as "sampleFile" as shown below:

addlib_1.png

This is because GCC will automatically add "lib" prefix to the library name.

Also, add the path to the directory which contains the file in the "Additional Library Directories" seen in the figure.

Now build your project and your file library will get linked with PSoC Creator.

Regards,

Dheeraj

Rile_3376121
Level 1
First like received First like given
Level 1

Thanks ddka.