Kompilien einer C ++ -App mit ONNX -Laufzeit -Headern mit -Std = C ++ 20 haben viele FehlerC++

Programme in C++. Entwicklerforum
Anonymous
 Kompilien einer C ++ -App mit ONNX -Laufzeit -Headern mit -Std = C ++ 20 haben viele Fehler

Post by Anonymous »

Verwenden von ONNX-Laufzeit mit G ++ (neuestem, v12), ich habe viele Fehler, wenn ich "-std = c ++ 20" verwende.
wie: < /p>

Code: Select all

W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h: In lambda function:
W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h:1968:27: error: 'const OrtApi' {aka 'const struct OrtApi'} has no member named 'ReleaseAvailableProviders'
1968 |     ThrowOnError(GetApi().ReleaseAvailableProviders(providers, len));
|                           ^~~~~~~~~~~~~~~~~~~~~~~~~
W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h: In function 'std::vector Ort::GetAvailableProviders()':
W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h:1971:25: error: 'const OrtApi' {aka 'const struct OrtApi'} has no member named 'GetAvailableProviders'
1971 |   ThrowOnError(GetApi().GetAvailableProviders(&providers, &len));
|                         ^~~~~~~~~~~~~~~~~~~~~
W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h: In constructor 'Ort::ShapeInferContext::ShapeInferContext(const OrtApi*, OrtShapeInferContext*)':
W:/projects/AI/ONNX/onnxruntime-win-x64-1.20.1/include/onnxruntime_cxx_inline.h:2002:31: error: 'const OrtApi' {aka 'const struct OrtApi'} has no member named 'ShapeInferContext_GetInputCount'
2002 |   Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputCount(ctx_, &input_count));
< /code>
Wenn ich "-std = c ++ 20" (oder ein beliebiges STD-Flag) ausgelasse, kann ich einfach gut kompilieren und der Code funktioniert wie erwartet. Es ist keine große Sache, aber ich bin neugierig, warum das so ist? < /P>
scheint, dass diese Inline -Funktionen einige Mitglieder verwenden, die nicht definiert sind. Kompilieren Sie mit g ++. Kompiliert einfach gut. < /p>
#include 
//#include 
#include 
#include 

int
main()
{

return 0;
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post