I got it fixed... kind of.
On a hunch, I switched back to MinGW4.72, and CryptoPP565 still failed to build. After trying all permutations of my setups, here is what I found:
MinGW CryptoPP
630 565 fail
630 562 fail
472 565 fail
472 562 works fine
Going back to my old MinGW and old CryptoPP worked fine. I only switched MinGW because the old one no longer works with Boost. Unfortunately, 630 does not work for Boost either :-)
I will keep monitoring the CryptoPP site and this group and test new releases when they are available.
I'll try testing MinGW again in the coming days. I was very busy in the last few weeks, but that should get better now.
Gene, what MinGW flavor are you using? The original 32-bit-only one from mingw.org?
The problem is that there's no threading support in libstdc++ when using native Windows threads. Compilation works fine for me with the pthreads version of MinGW-w64. It should also be possible to use a third-party pthreads library with the original mingw.org MinGW as mentioned here [1], but I've never tried that yet.
Hopefully it's also possible to distinguish between threading libraries used at compile time and set CRYPTOPP_CXX11_SYNCHRONIZATION accordingly. I'll look into that soon.
[1] http://www.mingw.org/wiki/pthreads_library
Marcel
I got it fixed... kind of.
On a hunch, I switched back to MinGW4.72, and CryptoPP565 still failed to build. After trying all permutations of my setups, here is what I found:
MinGW CryptoPP
630 565 fail
630 562 fail
472 565 fail
472 562 works fine
Going back to my old MinGW and old CryptoPP worked fine. I only switched MinGW because the old one no longer works with Boost. Unfortunately, 630 does not work for Boost either :-)
I will keep monitoring the CryptoPP site and this group and test new releases when they are available.
g++ -DNDEBUG -g2 -O3 -pthread -pipe -c socketft.cpp
socketft.cpp:36:23: fatal error: wspiapi.h: No such file or directory
# include <wspiapi.h>
^
compilation terminated.
make: *** [socketft.o] Error 1
Should we remove that header or comment it out? I don't know anyonedeveloping on Windows 2000 anymore. Windows XP and Windows 2003 are
the floors for the development shops I work with.
How does this fancy you:$ git diff
diff --git a/socketft.cpp b/socketft.cpp
index 454eaa5..20cda22 100644
--- a/socketft.cpp
+++ b/socketft.cpp
@@ -30,6 +30,14 @@
# include <sanitizer/msan_interface.h>
#endif
+// From http://groups.google.com/d/msg/cryptopp-users/MzvocLrbIpE/TMCa6LFhCgAJ,
+// <wspiapi.h> is a compatibility header and it needs _WIN32_WINNT >= 0x501.
+// The work-around should be OK since it won't cross-pollinate into header files.
+#if defined(__MINGW32__) && (_WIN32_WINNT < 0x501)
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x501
+#endif
I am building CryptoPP 5.65 with MingW 6.3.0.
The 32-bit prompt looks off to me. It says MINGW32 as expected, but the compiler is building for (targeting) 64-bit executable:
test@asus-windows MINGW32 ~/cryptopp
$ uname -a
MINGW32_NT-6.3 asus-windows8 2.9.0(0.318/5/3) 2017-09-13 23:16 x86_64 Msystest@asus-windows MINGW32 ~/cryptopp
$ gcc -dumpmachine
x86_64-pc-msysThose outputs look wrong to me for a 32-bit machine.