I did the following things to compile the re2 library and tests on cygwin
1) Compilation and installation of the library
hg clone https://re2.googlecode.com/hg re2 cd re2 make make install
2) Compilation of tests. Modify the Makefile and replace this line:
$(CXX) -o $@ obj/so/re2/testing/$*.o $(STESTOFILES) obj/so/util/test.o -Lobj/so -lre2 obj/libre2.a $(LDFLAGS) $(LDPCRE)
with this line
$(CXX) -o $@ obj/so/re2/testing/$*.o $(STESTOFILES) obj/so/util/test.o -L/usr/local/lib -lre2 obj/libre2.a $(LDFLAGS) $(LDPCRE)
And after that do
make test
A library compiled for me without problems and with the exception of one test.
You can also check this version of re2 for Visual Studio if you only need the Windows library version. http://code.google.com/p/re2win/
source share