我的sdk在OpenCV003项目里:
pro中添加
CONFIG(release, debug|release) {LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntimeLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_cudaLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_sharedLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_tensorrtLIBS += -L$$PWD/sdk/opencv/lib/ -lopencv_world470
}
else {LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntimeLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_cudaLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_sharedLIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_tensorrtLIBS += -L$$PWD/sdk/opencv/lib/ -lopencv_world470d
}INCLUDEPATH += $$PWD/sdk/onnxruntime-x64-gpu/include
INCLUDEPATH += $$PWD/sdk/opencv/includeCONFIG(release, debug|release) {onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_cuda.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_shared.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_tensorrt.dllopencv.files += $$PWD/sdk/opencv/bin/opencv_world470.dll
}
else {onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_cuda.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_shared.dllonnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_tensorrt.dllopencv.files += $$PWD/sdk/opencv/bin/opencv_world470d.dll
}CONFIG(release, debug|release) {onnxruntime.path += $$OUT_PWD/Releaseopencv.path += $$OUT_PWD/Release
}
else {onnxruntime.path += $$OUT_PWD/Debugopencv.path += $$OUT_PWD/Debug
}COPIES += onnxruntime
COPIES += opencv