I've been looking for a logging framework for C++. I'd read about several options, but hadn't really found anything I felt like trying, until a couple of days ago, when I discovered POCO C++.
I decided to give it a try, but the README seemed to be warning me I was in for some Interesting Times(TM):
Microsoft Visual Studio 7.1 (2003), 8.0 (2005), 9.0 (2008) or 10.0 (2010) is required to build the POCO C++ Libraries on Windows platforms.
I decided to give it a try, but the README seemed to be warning me I was in for some Interesting Times(TM):
Microsoft Visual Studio 7.1 (2003), 8.0 (2005), 9.0 (2008) or 10.0 (2010) is required to build the POCO C++ Libraries on Windows platforms.
BTW, the emphasis is mine.
Still, nothing new, just another OSS telling users of OSS on Windows: "You're on your own".
Before I go on, I've solved these problems on my own, but if I had searched the POCO Forum, I would've saved some time, as someone had posted solutions to all the problems I found. I did google it, but sometimes google is not enough.
I fired Msys and ran configure. I didn't follow README's advice, however, and didn't run make -s. I prefer having as much info available as possible, thank you very much, so I ran it with --debug and -w.
The first problem came in the form of an unrecognized option: -mno-cygwin. I looked in the <POCO_HOME>/build/config/MinGW file, and found these lines:
SHLIB = $(CXX) -shared -mno-cygwin -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED -I/usr/local/include -I/usr/include
A couple of searches, and I realized this option didn't apply to my version of gcc, so I removed it.
Then, the linker complained it couldn't find OpenSSL libs ssl and crypto. Having built OpenSSL, I had those libs, so I added another -L to this line, pointing to the OpenSSL libs (once again, in <POCO_HOME>/build/config/MinGW file):
SYSLIBS = -L/usr/local/lib -L/usr/lib -liphlpapi -lws2_32 -lssl -lcrypto -lws2_32 -lgdi32
Another go at make, and this time I got an error with strip. After making sure I hadn't inadvertently linked in my porn collection (it is rather sizable, and tends to show up in the most embarrassing places), I've decided to google strip. And then, naturally, strip command.
From what I've learned, it's nothing I should actually worry about at this stage, although it is something interesting to look into later on. So, I've decided to remove it from the <POCO_HOME>/build/config/MinGW file, by turning this
STRIP = strip
into this
STRIP =
And there you go, we have build! I've built the Logger example, and I plan on giving it a try on my own project.
And now for something slightly completely different: A semi-rant...
MS is preparing to cripple the next version of VC++ Express, which the POCO C++ blog also refers in this post.
I fail to see what's the drama, actually. Maybe now all the people behind OSS can actually direct their effort at creating a better support for OSS on Windows, instead of just saying "There you go, have these VC++ files and enjoy".