summarylogtreecommitdiffstats
path: root/tracker-neuralnet.patch
blob: 7470e34bc63fafbad457a4c12f1fd7d101e80031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git i/tracker-neuralnet/env.cpp w/tracker-neuralnet/env.cpp
index 563c9c1c..cc368873 100644
--- i/tracker-neuralnet/env.cpp
+++ w/tracker-neuralnet/env.cpp
@@ -11,7 +11,7 @@ void NeuralNetTracker::maybe_load_onnxruntime_dynamically()
 {
     QLibrary lib;
     lib.setLoadHints(QLibrary::PreventUnloadHint);
-    lib.setFileName(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH "onnxruntime" "." OPENTRACK_LIBRARY_EXTENSION);
+    lib.setFileName("onnxruntime" "." OPENTRACK_LIBRARY_EXTENSION);
     qDebug() << "tracker/nn: loading onnxruntime library" << lib.fileName();
     if (!lib.load())
     {
@@ -20,7 +20,7 @@ void NeuralNetTracker::maybe_load_onnxruntime_dynamically()
         std::abort();
     }
 
-    void* fn_OrtGetApiBase = lib.resolve("OrtGetApiBase");
+    auto* fn_OrtGetApiBase = (void*)lib.resolve("OrtGetApiBase");
     if (!fn_OrtGetApiBase)
     {
         qDebug().nospace() << "tracker/nn: can't find OrtGetApiBase in onnxruntime: " << lib.errorString() << ". now crashing.";
@@ -40,7 +40,7 @@ void NeuralNetTracker::maybe_load_onnxruntime_dynamically()
         std::abort();
     }
 
-    Ort::Global<void>::api_ = ort_api; // see ORT_API_MANUAL_INIT in the onnx c++ header.
+    Ort::InitApi(ort_api); // see ORT_API_MANUAL_INIT in the onnx c++ header.
 }
 
 } // namespace neuralnet_tracker_ns