Can't #include Poco/Net/NetworkInterface.h (codeblocks)

I’m playing around with Poco on CodeBlocks, using…

It’s generally speaking working, but I’m having problems with the NetworkInterface class. As soon as I include the header
#include “Poco/Net/NetworkInterface.h”

(just adding that one line to the poco EmptyExample, for example), I get these errors:

…\libs\poco\includes\Poco\Net\NetworkInterface.h|73|error: expected ,' or…’ before “struct”|
…\libs\poco\includes\Poco\Net\NetworkInterface.h|79|error: expected ,' or…’ before “struct”|

Need I say there are no signs of “struct” in the indicated file. (Why is that the compiler constantly reports other errors than what’s actually wrong? :slight_smile:

Has anybody used this class? Is it a CodeBlocks problem? It seems the Poco people are using VC, maybe it works there?

/ Bridell


Just so you know, the problem persists in the bootleg 006pre-Win-CB.rar I just got my hands on.

I dug a little deeper, It seems to have be because the NetworkInterface constructors use “interface” as a parameter name.

“interface” is #defined in MinGW\include\basetyps.h

I changed the line

NetworkInterface(const NetworkInterface& interface);


NetworkInterface(const NetworkInterface& anotherNetworkInterface);

(and the same trick again a little further down)

This lets the header file pass the compiler. By now I’ve almost forgotten why I needed to include that file in the first place… TBC.
/ Bridell

thanks ! that’s good info

I guess we will see that more and more as we combine libraries, so it’s nice to document those changes and offer feedback to the poco developers, for example.

take care!

I filed this as a bug on the SourceForge Poco project.