Pre-compiled static libraries


I wanted to know if it is possible to use some pre-compiled static libraries and related header files and reference them in a code which is in src directory.


Please take a look at build_flags.

build_flags = -I/opt/include -L/opt/lib -lfoo

Ahh…thanks, I almost forgot about it.

So I have library someLib.a, that I would like to use in my project. Will be my command look like:
build_flags = -L/folderToLibrary -lsomeLib


Yes, you are right. You need 2 things:

  • add a path where mylib.a archive is located via -L ...
  • add extra path to CPPATH where are located headers files via -I ...
  • add precompiled library to linker via -l mylib.