ming32 winsock2 link problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


ming32 winsock2 link problem

Josh CodeJosh Code Posts: 675Member

I'm trying to compile some code using Dev-c++ which internally uses the mingcc compiler. I'm trying to use some winsock 2 functions and running into problems in the linking stage of building my project.

Here is the error I get:
[Linker error] undefined reference to `gai_strerrorA@4'

I have -lws2_32 set as a parameter. I also have libws2_32.a in the lib directory. There are many other functions used without any message about them so it seems like the library is linked properly but that the .a file is old and doesn't have a definition for gai_strerrorA.

Do you have any tips or a place to find a newer version of this .a file?

Sign In or Register to comment.