#1708 freeaddrinfo() problems

WSL
closed
None
Support
duplicate
Duplicate
False
2013-02-19
2005-01-24
No

Hi,

the attached program results in a run-time error
with MinGW 3.2.0 rc3 (and also with earlier versions):

Something like
Did not find the procedure entry point
"freeaddrinfo" in DLL "WS2_32.DLL"

(In German: Der Prozedureinsprungspunkt "freeaddrinfo"
wurde in der DLL "WS2_32.DLL" nicht gefunden.)

This is on Windows 2000 Professional SP4, compilation
with
g++ -o free free.cpp -lws2_32

Am I missing something?

Kind regards
Ingolf

Discussion

  • Ingolf Steinbach

    Small program to demonstrate the error

     
  • Reed Hedges

    Reed Hedges - 2005-05-04

    Logged In: YES
    user_id=39867

    I am having the exact problem.

    According to MS documentation, freeaddrinfo() and
    getaddrinfo() are in ws2_32.dll. MinGW has them in libws2_32.a.

    But on Win2K SP4, those functions are actually in wininet.dll.

    Is this a bug in Win2K, or mingw? Or is there a way to
    "correct" this mix up (and "move" the export of the
    functions into wininet)?

    Should I just use gethostbyname?

     
  • Luke Dunstan

    Luke Dunstan - 2005-05-05

    Logged In: YES
    user_id=30442

    Until this is corrected, you can either:

    1. Use LoadLibrary and GetProcAddress to access the
    function

    2. Get the w32api source, modify the appropriate .def file and
    rebuild libwininet.a

     
  • Reed Hedges

    Reed Hedges - 2005-05-07

    Logged In: YES
    user_id=39867

    I have learned that getaddrinfo is not really supposed to be
    officially supported on Windows 2000. So I check for it in
    an autoconf script (inside libws2_32, NOT wininet) and use
    gethostbyname if it's not found.

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-12

    Ticket moved from /p/mingw/support-requests/45/

    Can't be converted:

    • _priority: 5
     
  • Earnie Boyd

    Earnie Boyd - 2013-02-12
    • labels: MinGW -->
    • Description has changed:

    Diff:

    • status: open --> pending
    • assigned_to: Earnie Boyd
    • milestone: --> WSL
    • type: --> Support
    • resolution: --> later
    • category: --> Unknown
    • patch_attached: --> False
     
  • Keith Marshall

    Keith Marshall - 2013-02-12

    So, https://sourceforge.net/p/mingw/bugs/1636/ would be a duplicate of this.

    The claim that getaddrinfo() and friends is supported on Win2K is conditional on some inline coding appearing in wspiapi.h -- a Microsoft header to which we are not privy. Without that inline code, these functions are not available prior to WinXP.

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-19
    • status: pending --> closed
    • resolution: later --> duplicate
    • category: Unknown --> Duplicate
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks