libpostal
libpostal copied to clipboard
Running under visual studio 2017.
Hi!
I was able to build libpostal.lib and .dll for the Visual Studio 2017.
I tried the following sample code and build it with Visual Studio without any compilation or linking error:
// Setup (only called once at the beginning of your program)
if (!libpostal_setup() || !libpostal_setup_parser()) {
exit(EXIT_FAILURE);
}
libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options();
libpostal_address_parser_response_t *parsed = libpostal_parse_address((char*)"781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA", options);
for (size_t i = 0; i < parsed->num_components; i++) {
printf("%s: %s\n", parsed->labels[i], parsed->components[i]);
}
// Free parse result
libpostal_address_parser_response_destroy(parsed);
// Teardown (only called once at the end of your program)
libpostal_teardown();
libpostal_teardown_parser();
But, when I run it, it stucks at libpostal_steup() and never return. The test code works fine under msys2. Any help appreciated.
Thanks