Undeclared Macros in <cerrno> in ofxNetwork when compiling with MinGW on windows

Hi there!
I am trying to compile a program with openFrameworks (most recent version pulled from git) on my windows 8.1 machine. I am using Code::Blocks and the latest MinGW (installed using mingw-get; GCC version is 4.8.1)
The trouble I am having is that I get a really weird error when the addon ofxNetwork is compiled (the program I am trying to compile depends on it). Here is the errror log:

||=== Build: debug in lpmt (compiler: GNU GCC Compiler) ===|
F:\openFrameworks\addons\ofxNetwork\src\ofxNetworkUtils.h||In function 'int ofxNetworkCheckErrno(const string&, const string&)':|
F:\openFrameworks\addons\ofxNetwork\src\ofxNetworkUtils.h|86|error: 'EALREADY' was not declared in this scope|
F:\openFrameworks\addons\ofxNetwork\src\ofxNetworkUtils.h|89|error: 'ENOPROTOOPT' was not declared in this scope|
F:\openFrameworks\addons\ofxNetwork\src\ofxNetworkUtils.h|92|error: 'EPROTONOSUPPORT' was not declared in this scope|
F:\openFrameworks\addons\ofxNetwork\src\ofxTCPClient.cpp||In member function 'std::string ofxTCPClient::receive()':|
F:\openFrameworks\addons\ofxNetwork\src\ofxTCPClient.cpp|228|error: 'ECONNRESET' was not declared in this scope|
F:\openFrameworks\addons\ofxNetwork\src\ofxTCPClient.cpp|228|error: 'ECONNABORTED' was not declared in this scope|
||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

It seems as if some macros that are supposed to be defined in <cerrno> are not defined there. I took a look at my <cerrno> file in my MinGW directory and they are indeed not defined there.
I don’t understand that. To my understanding I am using the most recent version of everything.
How can I fix this?

Thanks in advance,

Ok I did a bit more trial and error. I went the whole way and installed a fresh version of CodeBlocks including the MinGW compiler. Then I copied the emptyProject template and configured it, so that it compiles (using the compiler shipped with CodeBlocks). No problem until here. A gray window appears, everything seems fine.
Then I add the addons/ofxNetwork/src folder to the compiler search directories. If I hit compile now, the compile process termiantes with the same error as above.
I am starting to think this is a bug…

we only support codeblocks 12.10 yet so that might be the problem. try downloading that version. mingw also has to be the included one with codeblocks since some libraries will be incompatible with newer versions

Thanks for the response! I downloaded codeblocks version 12.11 (there is no 12.10) of their sourceforge repo and installed it. Using the compiler that came with it, I still get the same error messages…
I took a look at the errno.h file and the missing macros are actually not defined there or any of the files it includes. Could you take a look at your mingw/include/errno.h file and see if they are defined their?
This is super weird! How come nobody else is having trouble compiling ofxNetwork on windows? Is there anything else I can try to fix this?

do you see this same error with 0.8.4 ? (from the openframeworks/download page) ?

That worked! It still took me about three hours to get my programm to compile, but those were different errors… :smiley:
Awesome thanks for the tip. When I use version 0.8.4 of the dowload page, I dont get the errors in <cerrno>. I did a bit of research and the I found the breaking commit. In Line 101 the three Macros that throw the error seem to have been forgoten and are not surrounded by an OFXNETWORK_ERROR(...) call. If I do that it fixes tjhis issue. I will submit a pull request for it.

Thanks for the help everybody!