ld: library not found for -l


To build as libary

Right Click->Properties->Build->Setting-Build Artifact->Dropdown to choose Shared/Static library

Difference between Shared / Static library

Now to include this library, copy the library to the project you want it and put it in a libs folder at the same level as the src level. Note, I am assuming that you have a src folder.

On this project Right Click->Properties->Build->Setting->Libraries->

  1. in the -l area add name of library without the prefix lib and without the suffix .so
  2. in the -L area add ../libs, remember its 2 dots since the current folder is src, not the root of the project 🙂 YEAH, I tried ./libs for 1 hours before trying out ../libs

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s