Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] #13606

Open
realfleo opened this issue Nov 9, 2022 · 11 comments
Open

[Build] #13606

realfleo opened this issue Nov 9, 2022 · 11 comments
Labels
build build issues; typically submitted using template

Comments

@realfleo
Copy link

realfleo commented Nov 9, 2022

Describe the issue

Hello,

I am having this issue running imagenet. To have the project compile I need ONNX runtime 13 but when running it shutdowns with that error message:
The given version [13] is not supported, only version 1 to 10 is supported in this build.

I tried using an older version ex. onnxruntime-win-x64-1.10.0 but it does not compiles:
Severity Code Description Project File Line Suppression State
Error C2039 'AllocatedStringPtr': is not a member of 'Ort' capi_test D:\dev\onnxruntime-inference-examples-main\c_cxx\squeezenet\main.cpp 84

std::optionalOrt::AllocatedStringPtr input_name_;

The error seems to come from: onnxruntime.dll
I am using: onnxruntime-win-x64-1.13.1

Urgency

No response

Target platform

x64

Build script

cmake

Error / output

Severity Code Description Project File Line Suppression State
Error C2039 'AllocatedStringPtr': is not a member of 'Ort' capi_test D:\dev\onnxruntime-inference-examples-main\c_cxx\squeezenet\main.cpp 84

Visual Studio Version

2022

GCC / Compiler Version

No response

@realfleo realfleo added the build build issues; typically submitted using template label Nov 9, 2022
@yuslepukhin
Copy link
Member

The Api with AllocatedStr appeared in later versions of Ort API.

@realfleo
Copy link
Author

Later than 13? If available in the api of 13 why is onnxruntime.dll complains about it…?

@yuslepukhin
Copy link
Member

Let's start with the build problem. Open onnxruntime_cxx_api.h file from your IDE and see where it is included from and if the AllocatedStr is defined there.

@realfleo
Copy link
Author

I can build this using onnxruntime-win-x64-1.13.1
https://github.com/microsoft/onnxruntime-inference-examples/tree/main/c_cxx/imagenet

But when I run it it says: The given version [13] is not supported, only version 1 to 10 is supported in this build.

If I try with onnxruntime-win-x64-1.10.0 it does not compile because AllocatedStringPtr is not defined.

Maybe you can try running imagenet ?

@snnn
Copy link
Member

snnn commented Nov 10, 2022

Maybe you hit the same problem as #11230

@peanut1101
Copy link

My problem is ‘’The given version [13] is not supported, only version 1 to 10 is supported in this build.‘’
If it is solved, please send me an email.My email address is chen347444625@163.com

@natke
Copy link
Contributor

natke commented Mar 7, 2023

I got the same error on Windows and discovered the sample app was loading the onnxruntime.dll from the system directory (/c/WINDOWS/SYSTEM32/onnxruntime.dll ) I had set the ONNXRUNTIME_ROOTDIR to my new installation (1.14.0). Is there another config that is needed to load the DLL from the local dir rather than the system? If so let me know and I will update the docs

@snnn
Copy link
Member

snnn commented Mar 8, 2023

Copy onnxruntime.dll to where your exe lives.

@natke
Copy link
Contributor

natke commented Mar 8, 2023

Thanks - can this be done automatically via cmake or the sln project?

@theonlyhacker
Copy link

Copy onnxruntime.dll to where your exe lives.

thanks!!! that works for me, i download the onnxruntime version==1.16.2.

@BOT-at-office
Copy link

Copy onnxruntime.dll to where your exe lives.

thanks, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template
Projects
None yet
Development

No branches or pull requests

8 participants
@snnn @natke @yuslepukhin @theonlyhacker @peanut1101 @realfleo @BOT-at-office and others