Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#75 undefined reference to getaddrinfo()

closed
Earnie Boyd
None
5
2014-08-18
2006-03-28
No

The example on the microsoft web site :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp
fails with gcc version 3.4.* (also tested with the
latest release 3.4.5), but works with gcc version 3.2.3
(mingw special 20030504-1).

Alex

Discussion

  • Logged In: YES
    user_id=1009175

    My bad, it's not 3.2.3, but 3.4.2.
    In fact, when I install with MinGW-5.0.2.exe it does not
    work with 3.4.2 but if I install with MinGW-3.2.0-rc-3.exe
    it works.

     
  • Earnie Boyd
    Earnie Boyd
    2006-03-29

    • labels: --> 103944
    • assigned_to: nobody --> dannysmith
     
  • Earnie Boyd
    Earnie Boyd
    2006-03-29

    • assigned_to: dannysmith --> earnie
    • labels: 103944 -->
     
  • Earnie Boyd
    Earnie Boyd
    2006-03-29

    • milestone: --> 510008
    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2006-03-29

    Logged In: YES
    user_id=15438

    Your problem then is most likely that you didn't install the
    mingw-runtime and w32api modules.

     
    • status: pending --> open
     
  • Logged In: YES
    user_id=1009175

    This is possible, I will retry when I will have some time
    and post a comment after that.

    Alex

     
  • Earnie Boyd
    Earnie Boyd
    2006-03-29

    • milestone: 510008 --> Waiting_user_response
    • status: open --> pending
     
  • Danny Smith
    Danny Smith
    2006-03-29

    Logged In: YES
    user_id=11494

    This happened:
    2005-03-07 Danny Smith <dannysmith@users.sourceforge.net>

    \* include/ws2tcpip.h \(getaddrinfo, freeaddrinfo,
    

    getnameinfo):
    Guard with _WIN32_WINNT >= 0x0501.

    So, unless you define _WIN32_WINNT =0x0501 or higher, you
    won't see the prototype, and hence you won't see the
    WINAPI.

    Danny

     
    • status: pending --> closed
     
  • Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).