1

I'm trying to compile Poco-1.5.1 with MinGW (gcc 4.7.0) under Windows 7.

It have the std::copysign issues at Foundation\include\Poco\FPEnvironment_DUMMY.h, but it is easy to solve commenting "std::" at copySignImpl methods.

My next problem comes with file "Foundation\src\EventLogChannel.cpp", that is trying to include "pocomsg.h", that doesn't exist.

I have read that pocomsg.h is generated from pocomsg.mc script. MC is a Message Compiler from Microsoft, and it is not present in my MinGW system. So should I include manually pocomsg.h as say this post?

poco Lib dosnt compile in vs express 9

Is there a better way to solve this?

Thanks.

Community
  • 1
  • 1
Cesar Ortiz
  • 884
  • 1
  • 8
  • 25

1 Answers1

1

pocomsg.h should be found in ../Foundation/src/

It doesn't contain too much important stuff according to this post, A couple of defines:

#define POCO_CTG_FATAL                   0x00000001L
#define POCO_CTG_CRITICAL                0x00000002L
#define POCO_CTG_ERROR                   0x00000003L
#define POCO_CTG_WARNING                 0x00000004L
#define POCO_CTG_NOTICE                  0x00000005L
#define POCO_CTG_INFORMATION             0x00000006L
#define POCO_CTG_DEBUG                   0x00000007L
#define POCO_CTG_TRACE                   0x00000008L
#define POCO_MSG_LOG                     0x00001000L

Are the guts of the file. Try defining them yourself in Poco.h, possibly.

Community
  • 1
  • 1
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
  • Thanks, it works, but now I have new problems with DNS.cpp, that can`t find getaddrinfo, freeaddrinfo and others. Any clue? – Cesar Ortiz Jul 31 '13 at 09:03
  • checkout: http://stackoverflow.com/questions/5220190/undefined-reference-to-getaddrinfo – David Karlsson Jul 31 '13 at 17:58
  • OK, I replaced-DWINVER=0x500 with -DWINVER=0x501 in file build\config\MinGW, and now getaddrinfo (and others) works... but now in NetworkInterface.cpp it says that 'Error' and 'rc' are not declared. More clues? (thanks again) – Cesar Ortiz Aug 01 '13 at 08:26
  • You maybe should click resolved on this question and post a new one, i'll look into it! – David Karlsson Aug 02 '13 at 17:33
  • do you mean: ERROR_BUFFER_OVERFLOW, ERROR_SUCCESS, NO_ERROR? They might be standard stuff, maybe you can use: [winerror.h](http://stuff.mit.edu:8001/afs/athena/software/cygwin/cygwin_v1.3.2/usr/include/w32api/winerror.h) More info [here](http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx). (I figured this out from looking at the cpp [file](https://github.com/pocoproject/sandbox/blob/master/Sockets/src/NetworkInterface.cpp) – David Karlsson Aug 02 '13 at 17:46