diff --git a/onnxruntime/test/platform/path_lib_test.cc b/onnxruntime/test/platform/path_lib_test.cc index 4dfd1eb230..e14c7d4d7c 100644 --- a/onnxruntime/test/platform/path_lib_test.cc +++ b/onnxruntime/test/platform/path_lib_test.cc @@ -1,9 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -#include "core/platform/path_lib.h" - -#include "gtest/gtest.h" #include #include "gtest/gtest.h" @@ -11,6 +8,12 @@ #include "core/platform/env.h" #include "test/framework/test_utils.h" +// Windows.h reserves the word OPTIONAL in macro, which introduces +// conflict on variables declared from onnx external library. Currently workaround +// this by re-ordering the included files. +// TODO: undefine OPTIONAL in path_lib.h and move path_lib.h to the first include +#include "core/platform/path_lib.h" + namespace onnxruntime { namespace test {