Bruno Haible wrote:
I am now getting

undefined reference to `_gethostname_used_without_requesting_gnulib_module_gethostname'

This indicates that you have included gnulib <unistd.h>, are using 
gethostname(),
and have not asked for the gnulib module 'gethostname'.
  - If you want to use a POSIX compliant gethostname() function, you need to
    request the 'gethostname' module.
  - If you want to use Win32 gethostname() - handling errors in the Win32 way,
    and guaranteeing the socket library initialization call yourself - then be
    sure to #include <unistd.h>, then #undef gethostname, and then #include
    <winsock2.h> and <ws2tcpip.h>.

thanks.
now I get a linking error:

Warning: resolving _gethostname by linking to _gethostn...@8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
libgnu_cl.a(sockets.o): In function `close_fd_maybe_socket':
/cygdrive/c/sds/dev/current/build-mingw-O-2/gllib/../../src/gllib/sockets.c:44:
undefined reference to `_wsaenumnetworkeve...@12'
collect2: ld returned 1 exit status

curiously, this happens only when I link the base linking set; the boot linking set is created just fine

Reply via email to