How to access myLibrary API

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

cross mob
Anonymous
Not applicable

Hello

   

I create a simple MY library project in which create one header file i.e simple.h and one source file simple.c and write one routine in simple .c and build it.It successfully build.

   

I create one BLE application project PSOC4 ble and include this library in both location (dependencies section and tool->option->project Management->default dependencies set path for library) , but when I use API of simple.c file Its shown error. I can't access API of MYlibrary .

   

I missing any setting or any step while accessing of myLibrary's API.

   

Thanks in Advance

0 Likes
1 Solution

You need to add the folder to the additional library folders. The you specify the additional library as 'YourName' (when the file is called 'libYourName.a'.

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

This is probably a naming problem: A library must be named  libYourname.a (a prepended "lib" and an appended ".a"). In the project settings you add the lib "Yourname".

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello bob,

   

can you provide setting where i Have to add Lib.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Project->Build Settings->Linker->General->Additional Libraries

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello bob,

   

When i give path of lib.a file , then it shows build error.

0 Likes

You need to add the folder to the additional library folders. The you specify the additional library as 'YourName' (when the file is called 'libYourName.a'.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you provide us with some screenshots to see what you specified? lib.a is an invalid name for a library

   

 

   

Bob

0 Likes