Inference on mac os 10.14 #5062
xidiancpy
started this conversation in
Ideas / Feature Requests
Replies: 1 comment
-
Sorry for the delay; were you able to figure this out or still need assistance? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Compile when I just load the header file ”#include <onnxruntime_cxx_api.h>“ in main.cpp, Will appear
Undefined symbols for architecture x86_64:
"_OrtGetApiBase", referenced from:
___cxx_global_var_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)Undefined symbols for architecture x86_64:
"_OrtGetApiBase", referenced from:
___cxx_global_var_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compile when I just load the lib file ”libonnxruntime.1.3.0.dylib“ in xcode "Link Binary With Libraries", Will appear
dyld: Library not loaded: @rpath/libonnxruntime.1.3.0.dylib
Referenced from: /Users/quanshi/Desktop/pengyu/ProtraitSeg/DerivedData/ProtraitSeg/Build/Products/Release/ProtraitSeg
Reason: image not found
Urgency
I use the same library and code in windows and Linux are not able to run normally, I hope to get a reply within three days.
System information
To Reproduce
#include <assert.h>
#include <onnxruntime_cxx_api.h>
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/imgproc/types_c.h>
#include <opencv2/photo.hpp>
#include
using namespace std;
using namespace cv;
#define INPUT_SIZE 256
#define TIME_TEST 1
int main(int argc, char* argv[]) {
#ifdef TIME_TEST
double time = 0;
double counts = 0;
LARGE_INTEGER nFreq;
LARGE_INTEGER nBeginTime;
LARGE_INTEGER nEndTime;
QueryPerformanceFrequency(&nFreq);
QueryPerformanceCounter(&nBeginTime);
#endif
imshow("alpha", ori_img);
char c = (char)waitKey(1);
if (c == 27) // quit after ESC
break;
}
cap.release();
alpha.release();
blob.release();
return 0;
}
Expected behavior
I want to know if additional files need to be installed under Mac OS? Please help me complete the compilation.
Beta Was this translation helpful? Give feedback.
All reactions