firstly decompile is only for some language like (C#,Java,VB.Net,etc) who use a virtual machine or common language runtime are can be decompiled but a language like (C,C++,Rust,GO) can not be decompiled only can be (disassemble) because they compile to native machine code or lower code like (Assembly) so if your target library or dll are compiled with with (Visual C++ compiler or GCC or G++ ) then you need disassemble & have a good skill in assembly language ,also some program or library mostly mac os x program are use (Clang) for compile code so you can back him to llvm code then do what you want.
so simple if your target are based Virtual Machine Language are easy to decompiled to her source otherwise compiled language they compile to native code is realy hard only in assembly code possible.