Link to home
Start Free TrialLog in
Avatar of DJ_AM_Juicebox
DJ_AM_Juicebox

asked on

linking to zlib

Hi,

I'm running fedora, how do you link to zlub? I think zlib s already installed on fedora - same question for pthreads - what's the linker flag for it?

Thanks
Avatar of mkuutti
mkuutti

-lz -lpthread

f.e. "gcc -o outputfile -lz -lpthread my_threaded_and_zlib_usable_program.c"

Of course you need to include proper .h-files in code and make sure that zlib (and dev-files of zlib) are installed
Avatar of DJ_AM_Juicebox

ASKER

You don't need to specify the version for pthreads? I've seen:

    -lpthread-2.5


Thanks
ASKER CERTIFIED SOLUTION
Avatar of mkuutti
mkuutti

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial