Install library with cmake

Hello,

I am trying to create a library with cmake to use it on a service.
The library passes the configure and build step, but I don’t know how to install it properly.

Here is the command I use to install the library :
image
This install the lib on staging/usr/lib and the llibrary’s name is libnn_shared.so

In the atom.mk file I wrote :

LOCAL_EXPORT_LDLIBS := -llibnn_shared

When I want to use it, I can include the header but I can’t use the function. I get this error :

 undefined reference to `test()'

Do you know how i can install the library ?

Best,
Thomas

Hi,

If the name of the lib is “libnn_shared.so”, the correct flag is -lnn_shared.

Also can you check that there really is a ‘test’ function in the library (this generic names seems odd for me) ?
the command nm -D should give you the list of exported symbols (norammy the ones with letter ‘T’)

YMM

This topic was automatically closed after 30 days. New replies are no longer allowed.