trouble converting libgsl.a -> libgsl.so on cygwin

Mirko Vukovic mirko.vukovic@gmail.com
Sun Feb 17 03:17:00 GMT 2008


I am trying to convert the gsl libraries from static to shared.  I
only became aware of the beasts and their difference in the past few
days, and I found the following command example to do it
(http://homes.esat.kuleuven.be/~gcc/shared_libraries.html):

#! /usr/bin/ksh -p
#
# Makes a shared library from a static one
#
static_library=$1; shared_library=$2
ld -shared -s -h /freeware/gcc/linux-i386/lib/{shared_library} -o
${shared_library:-${static_library%%a}so} -whole-archive
${static_library}

But on cygwin, ld does not have the -h option, and following the
suggested command thus:
ld -shared -s -o libgsl.so -whole-archive libgsl.a
gives a long listing of undefined references.  And of course, no .so
library at the end of the exercise.

What am I doing wrong?

Thanks,

Mirko



More information about the Gcc-help mailing list