I am not an expert.
AFAIK:
You cannot create a non-GPL'ed derivative work over the GPL'ed base work. However, interpretations of what is “derivative work” differ. As a common denominator:
You cannot link a GPL'ed library to your code (without making it GPL'ed too). (Although there are different opinions of this topic, see GNU_General_Public_License / Linking and derived works / Libraries in Wikipedia, but at least the Free Software Foundation says that you cannot link — neither statically nor dynamically.)
In general, you can execute a GPL'ed executable from your code (without making it GPL'ed too). But only unless the communication between your program and an executed program is “too tight”, for example Free Software Foundation says in FAQ / What is the difference between an “aggregate” and other kinds of “modified versions”:
By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.
Isn't not forbidden to have GPL'ed and non-GPL'ed parts in a same distribution (of course, unless the parts violate the copyright themselves, e.g. when non-GPL'ed parts link to GPL'ed ones) — see the same question in the FSF FAQ.
In practice the following trick is sometimes done to use a GPL'ed code from non-GPL'ed: you can write a GPL'ed wrapper-executable around the GPL'ed library. So your code communicates with a separate GPL'ed executable (instead of linking to the GPL'ed library). However, the nature/purpose/tightness of communication also matter.
Sometimes GPL'ed and non-GPL'ed parts are distributed separately, i.e. one part is initially distributed and then it downloads the other one per user request (this makes to feel that the second part is not really a strong dependency but something like an add-on, and therefore the first part isn't a derived work). However, AFAIK, this makes sense only in the opposite case — when a GPL'ed code uses a proprietary one (and the proprietary one might have specific restrictions); and the GPL itself doesn't forbids distribution as a part of aggregate (see #2 above).