If I really need to use some library (for example Graphic toolkits etc.) I tend to try to understand it by looking at its source. I try to make some modifications in it, try to make them run. That way I get somewhat an understanding of the library and the problem domain itself.
Usually you only need a small part of a library. You can look at the implementation at that library and then incorporate it in your program and slowly improve it. That way your dependencies won't get bloated, you'll get a customized solution with little effort and if you encounter problems you'll know where to fix them. That's a trick I've learned over the years.