Hi David,
I don't think its possible to compile the example reverse collator or a custom one on windows without modifying the SConstruct file, I have written a patch that adds the reverse collator to libwiredtiger.lib and a reverse_collator.lib. Could you give that a try?
Patch:
diff --git a/SConstruct b/SConstruct
index 5eddc4e35..807c5296a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -28,6 +28,9 @@ AddOption("--enable-diagnostic", dest="diagnostic", action="store_true", default
AddOption("--enable-lz4", dest="lz4", type="string", nargs=1, action="store",
help="Use LZ4 compression")
+AddOption("--enable-reverse-collator", dest="collator", type="string", nargs=1, action="store",
+ help="Build the reverse collator library")
+
AddOption("--enable-java", dest="lang-java", type="string", nargs=1, action="store",
help="Build java extension, specify location of swig.exe binary and Java JDK dir separated by comma")
@@ -110,7 +113,9 @@ useZlib = GetOption("zlib")
useSnappy = GetOption("snappy")
useLz4 = GetOption("lz4")
useTcmalloc = GetOption("tcmalloc")
+useCollator = GetOption("collator")
wtlibs = []
+reverse_collatorlibs = []
conf = Configure(env)
if not conf.CheckCHeader('stdlib.h'):
@@ -147,6 +152,12 @@ if useLz4:
print('lz4.h must be installed!')
Exit(1)
+if useCollator:
+ conf.env.Append(CPPPATH=[useCollator + "/include"])
+ conf.env.Append(LIBPATH=[useCollator + "/lib"])
+ reverse_collatorlibs.append("reverse_collator")
+ wtlibs.append("reverse_collator")
+
if useTcmalloc:
conf.env.Append(CPPPATH=[useTcmalloc + "/include"])
conf.env.Append(LIBPATH=[useTcmalloc + "/lib"])
@@ -256,8 +267,15 @@ if useSnappy:
if useLz4:
wtsources.append("ext/compressors/lz4/lz4_compress.c")
+if useCollator:
+ wtsources.append("ext/collators/reverse/reverse_collator.c")
+
wt_objs = [env.Object(a) for a in wtsources]
+reverse_collator = env.Library(
+target="reverse_collator",
+source="ext/collators/reverse/reverse_collator.c", LIBS=reverse_collatorlibs)
+
# Static Library - libwiredtiger.lib
#
wtlib = env.Library(
@@ -274,6 +292,8 @@ wtdll = env.SharedLibrary(
env.Depends(wtdll, [filelistfile, version_file])
+Default(reverse_collator)
+
Default(wtlib, wtdll)
wtbin = env.Program("wt", [
Regards,
Luke