Fix graph examples for WoA

* Fix compiler and runtime errors

* Resolves MLCE-1236

Change-Id: I22cfd8e7ef267c039efe86fa71838a6011d4d85b
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11345
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
diff --git a/examples/SConscript b/examples/SConscript
index 16f31d9..8ece7e6 100644
--- a/examples/SConscript
+++ b/examples/SConscript
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
-# Copyright (c) 2017-2023 Arm Limited.
+# Copyright (c) 2017-2024 Arm Limited.
 #
 # SPDX-License-Identifier: MIT
 #
@@ -51,11 +51,18 @@
     graph_dependency = [arm_compute_graph_so]
 
 extra_link_flags = []
-if env['os'] != 'bare_metal':
+
+if not env['os'] in ['windows','bare_metal'] :
     extra_link_flags += ['-fstack-protector-strong']
 
-load_whole_archive = '-Wl,--whole-archive'
-noload_whole_archive = '-Wl,--no-whole-archive'
+
+if env['os'] != 'windows' :
+    load_whole_archive = '-Wl,--whole-archive'
+    noload_whole_archive = '-Wl,--no-whole-archive'
+else:
+    load_whole_archive = '/wholearchive'
+    noload_whole_archive = ''
+
 if 'macos' in examples_env['os']:
     load_whole_archive = '-Wl,-force_load'
     noload_whole_archive = ''
@@ -67,7 +74,7 @@
 for file in Glob("./graph_*.cpp"):
     example = os.path.basename(os.path.splitext(str(file))[0])
     prog = None
-    if env['os'] in ['android', 'macos', 'bare_metal'] or env['standalone']:
+    if env['os'] in ['android','windows', 'macos', 'bare_metal'] or env['standalone']:
         prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+[load_whole_archive, graph_dependency, noload_whole_archive] + extra_link_flags)
         Depends(prog, graph_dependency)
         prog = install_bin(prog)
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp
index ca8e14a..7e618c9 100644
--- a/utils/GraphUtils.cpp
+++ b/utils/GraphUtils.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2024 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -711,13 +711,13 @@
         case DataType::QASYMM8:
         case DataType::U8:
         {
-            std::uniform_int_distribution<uint8_t> distribution_u8(_lower.get<uint8_t>(), _upper.get<uint8_t>());
+            std::uniform_int_distribution<uint32_t> distribution_u8(_lower.get<uint8_t>(), _upper.get<uint8_t>());
             fill<uint8_t>(tensor, distribution_u8);
             break;
         }
         case DataType::S8:
         {
-            std::uniform_int_distribution<int8_t> distribution_s8(_lower.get<int8_t>(), _upper.get<int8_t>());
+            std::uniform_int_distribution<int32_t> distribution_s8(_lower.get<int8_t>(), _upper.get<int8_t>());
             fill<int8_t>(tensor, distribution_s8);
             break;
         }