Ld undefined reference with neighboring directory

just put your library in the known shared library directory

Not good solution because I want make some changes in lib for current project.

you did before copy the files inside your sketch directory

With Makefile it's not a problem, but my co-workers using only IDE, so...

copies everything under your sketch directory into a temp directory somewhere else before compiling

I tried to use symlinks. This way:

proj/
├── sketch1
│   ├── sketch1.ino
│   ├── share -> ../share/
// sketch1.ino
#include <share/mylib.h>

gives the same ld error.

But if I create symlinks:

proj/
├── sketch1
│   ├── sketch1.ino
│   ├── mylib.h -> ../share/mylib.h
│   ├── mylib.cpp -> ../share/mylib.cpp
// sketch1.ino
#include <mylib.h>

It works. And better than suggested solutions. But it breaks compatibility with Windows.