Cannot compile TorchLib on Windows 10 with GNU compiler

Hello. Trying to compile test torch.cpp file that includes TorchLib on Windows 10 , and it fails.

compile command:
g++ torch.cpp -I include -L lib

file contents:

#include <torch/script.h> // One-stop header.

#include <iostream>
#include <memory>

int main(int argc, const char* argv[]) {
  if (argc != 2) {
    std::cerr << "usage: example-app <path-to-exported-script-module>\n";
    return -1;
  }


  torch::jit::script::Module module;
  try {
    // Deserialize the ScriptModule from a file using torch::jit::load().
    module = torch::jit::load(argv[1]);
  }
  catch (const c10::Error& e) {
    std::cerr << "error loading the model\n";
    return -1;
  }

  std::cout << "ok\n";
}

Errors:
a lot of
include/c10/macros/Macros.h:252:5: error: ‘__assert_fail’ was not declared in this scope
and warnings -
sorry can’t post them here

Thanks for any help.