Skip to content

Automatic Lib Init (NetworkInitializer) is not working on MinGW #661

@asari-fd

Description

@asari-fd

I'm writing a network client using Poco and MinGW.
It seems that I have to call Poco::Net::initializeNetwork() before calling any network-related functions, otherwise I get an exception like "DNS error: EAI: 10093", which means WSANOTINITIALISED (according to http://support.microsoft.com/kb/819124/) -- is it intended?

I think I'd be happy if I can always omit initializeNetwork() calls. Thanks.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty
$ dpkg -l | grep mingw32
ii  mingw32                           4.2.1.dfsg-2ubuntu1                      amd64        Minimalist GNU win32 (cross) compiler
ii  mingw32-binutils                  2.20-0.2ubuntu1                          amd64        Minimalist GNU win32 (cross) binutils
ii  mingw32-runtime                   3.15.2-0ubuntu1                          all          Minimalist GNU win32 (cross) runtime
$ i586-mingw32msvc-gcc --version
i586-mingw32msvc-gcc (GCC) 4.2.1-sjlj (mingw32-2)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat VERSION 
1.6.0 (2014-12-22)

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions