/John
On Nov 21, 4:59 am, Philippe Liard <philip.li...@gmail.com> wrote:
> Hi John,
>
> I also had the problems you mentioned. I found a workaround using a binary
> distribution available at:http://www.boostpro.com/download/
>
> I downloaded the BoostPro 1.44.0 installer and only selected Boost thread
> during the installation process.
> It works perfectly.
>
> I now have to build/install the other dependencies.
>
> Cheers,
> Philippe.
>
> --
> Philippe Liard
>
> On Thu, Nov 17, 2011 at 09:18, Philippe Liard <philip.li...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi John,
>
> > I started yesterday installing Windows to build/test the library. I will
> > help you once everything is working.
>
> > Cheers,
> > Philippe.
>
> > --
> > Philippe Liard
>
Plugging these into cmake for libphonenumber with ICU 4.8.1
successfully generates a VS2010 project.
At this point default_logger.h requires patching for windows to fix
the std::snprintf that doesn't exist in windows c++ land. Here's the
patch I used:
Index: default_logger.h
===================================================================
--- default_logger.h (revision 389)
+++ default_logger.h (working copy)
@@ -17,6 +17,10 @@
#ifndef I18N_PHONENUMBERS_DEFAULT_LOGGER_H_
#define I18N_PHONENUMBERS_DEFAULT_LOGGER_H_
+#if _MSC_VER
+#define snprintf _snprintf_s
+#endif
+
#ifdef USE_GOOGLE_BASE
namespace i18n {
@@ -67,7 +71,7 @@
struct ConvertToString<int> {
static inline string DoWork(const int& n) {
char buffer[16];
- std::snprintf(buffer, sizeof(buffer), "%d", n);
+ snprintf(buffer, sizeof(buffer), "%d", n);
return string(buffer);
}
};
Building this project succeeds in building a phonenumber.lib and
phonenumber_test.lib but the phonenumber-shared DLL fails to build as
well as the test app.
That's great news! Yes, I was getting linkage errors last night. I
look forward to your patches then!
/John
On Nov 23, 12:43 am, Philippe Liard <philip.li...@gmail.com> wrote:
> Hi John,
>
What version of gtest are you using? The one included with protobuf
2.4.1 doesn't build the gtest-md lib.
/John
It builds for me! In the debug build I had to change some linker
settings to point to the debug gtestd.lib, and even then running the
debug libphonenumber_test.exe crashed. The release build however ran
fine with one error. I'm not sure if it's the same one you got, but it
was:
[ FAILED ] PhoneNumberMatcherTest.IsLatinLetter
Thanks for the updates, glad we got windows finally working with
cmake!