-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
contributions welcomeexternal contributions welcomeexternal contributions welcomefeature requestrequest for unsupported feature or enhancementrequest for unsupported feature or enhancement
Description
Describe the bug
I am trying to include onnxruntime into a c-application for win 10. For that I use the precompiled binaries here. Compiling of my program stops with error: unknown type name '_Frees_ptr_opt_'. Google can't help.
I added my gcc command below. Did I miss sth? Thanks in advance.
In file included from onnxdemo.c:2:
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:142:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Env);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:143:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Status); // nullptr for Status* indicates success
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:144:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Provider);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:145:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(AllocatorInfo);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:146:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Session);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:147:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Value);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:148:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(ValueList);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:149:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(RunOptions);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:150:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(TypeInfo);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:151:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(TensorTypeAndShapeInfo);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:152:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(SessionOptions);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:153:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(Callback);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:139:32: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRelease##X, _Frees_ptr_opt_ Ort##X* input);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
^~~~~~~~~~~
onnxruntime_c_api.h:154:1: note: in expansion of macro 'ORT_RUNTIME_CLASS'
ORT_RUNTIME_CLASS(CustomOpDomain);
^~~~~~~~~~~~~~~~~
onnxruntime_c_api.h:357:31: error: unknown type name '_Frees_ptr_opt_'
ORT_API(void, OrtRunCallback, _Frees_ptr_opt_ OrtCallback* f);
^~~~~~~~~~~~~~~
onnxruntime_c_api.h:127:44: note: in definition of macro 'ORT_API'
ORT_EXPORT RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
System information
- Windows 10 Pro 64 bit
- ONNX Runtime installed from binary
- ONNX Runtime v0.4.0 (https://github.com/Microsoft/onnxruntime/releases/tag/v0.4.0)
- MinGW-w64
To Reproduce
gcc -L"./" -lonnxruntime -o onnxdemo onnxdemo.c
onnxdemo.c
#include "onnxruntime_c_api.h"
#include <stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
contributions welcomeexternal contributions welcomeexternal contributions welcomefeature requestrequest for unsupported feature or enhancementrequest for unsupported feature or enhancement