IANAL, but the concepts are fairly straightforward.
First, you and your lawyer must read the GPL and LGPL licenses. Second, you should read the GPL FAQ. As far as I understand, you can think of using GPL/LGPL libraries in this way:
- If you link dynamically or statically with a GPL or LGPL library, you have created a derivative work.
- If you use a library that is GPL, and you link with that library, your software must be released with a compatible license.
- If you use a library that is LGPL, and you dynamically link with that library, your software does not have to be released with a compatible license, but you must still comply with the LGPL.
- If you use a library that is LGPL, and you statically link with that library, your software must be released with a compatible license.
- The GPL/LGPL licenses mean "free" as in "free speech", not "free beer". You can create a derivative work and sell it for large amounts of money, but you must comply with the GPL/LGPL.