MSVC unit tests fail then crash


I’m building META with MSVC in visual studios community 2017, using cmake.

I use these flags when running cmake: -DCMAKE_BUILD_TYPE="Release" -DICU_ROOT:PATH="D:/Programs/meta-toolkit/deps/icu-60.2" -DCMAKE_VERBOSE_MAKEFILE:BOOL="ON" -DMETA_STATIC_UTF:BOOL="ON".

See the cmake generation output at:

The cmake generation and the build run without errors, although the build produces 670 warnings.

See the output of the unit tests at:

The .exe then crashes and VS gives the error

Unhandled exception at 0x00007FFE411F3FB8 in unit-test.exe: Microsoft C++ exception: cpptoml::parse_exception at memory location 0x0000001E738FECD0.

I replaced deps/cpptoml with the version at this location: as suggested in another forum post, but I still get the same error.

Surprisingly, pos-tag.exe still runs successfully.

D:\Programs\meta-toolkit\build\meta-release>pos-tag.exe ../../config.toml
> Loading feature mapping: [================================] 100% ETA 00:00:00
Type a sentence to have it POS-tagged, blank to exit.
> This is a test sentence.
=> This_DT is_VBZ a_DT test_NN sentence_NN ._.

Is MSVC even supported? Any suggestions as to what the problem is with the unit tests and/or cpptoml?

I also have problems when build META as shared libraries, using the additional cmake flags -DBUILD_SHARED_LIBS:BOOL="ON" -BUILD_STATIC_ICU:BOOL="OFF". The second option is OFF because I already have the ICU binaries and the cmake generation gives an error saying the static ICU binaries will not be built on windows. Perhaps I don’t have the correct static ICU binaries? Or the correct path to the binaries isn’t picked up?

When building, the build/lib/ folder isn’t populated, as it was in the previous build and the build fails with errors; cannot open input file 'lib\meta-utf.lib' and if make install is run; cannot open input file 'lib\meta-parser-trees.lib'. Are additional flags needed to make the shared libraries on windows?


The config.toml file that I was pointing to ../../config.toml, is ignored. This exe only looks for the config file at ../config.toml and the location cannot be changed with arguments to the exe.

With the correct config file, only about 29 tests fail.