If you need to link your code against some GPL code, then your code is GPL. But in most cases, a program that runs in a Linux environment doesn't need to link against any GPL libraries.
Because of this, libraries are frequently licensed under the Lesser GPL instead, which does permit linking without causing the resultant work from becoming GPL'ed itself: