无法定位程序输入点 xxxx与动态链接库 E:\code\prj\xxx\qgis_core.dll 上

问题描述

在使用Qgis 二次开发过程中,环境搭建完成,程序构建成功,在运行程序时出现了以下类似问题 找不到 jvm.dll, 无法定位动态库 xxx.dll
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
类似问题有很多

问题分析

在程序运行时,需要加载很多的库文件,我们需要的某个dll 中还包含着其他的dll文件,但是这些dll文件我们并没有加载进来,所以导致了 无法定位程序输入点

处理方式

可以使用 库依赖工具 检测某个我们需要的dll文件依赖的其他库文件和插件库添加到工程中就可以解决遇到的问题。查看这篇文章 下载和使用 库依赖查询工具

或者可以将工程可能(所有)用到的库文件,插件库 都放到工程所在目录下,然后重新构建工程,运行程序

处理结果

经过上述的操作,问题得以解决,程序运行成功,环境搭建完成。
在之后的开发过程中,如果还需要用到其他头文件,如果没有对应的库,则可以头文件和源文件拷贝到工程下使用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
class SR_net { public: SR_net(string path, vector<int> input_size, bool fp32, bool cuda = true); private: vector<int64_t> Gdims; int Gfp32; Env env = Env(ORT_LOGGING_LEVEL_ERROR, "RRDB"); SessionOptions session_options = SessionOptions(); Session* Gsession = nullptr; vector<const char*> Ginput_names; vector<const char*> Goutput_names; vector<int> Ginput_size = {}; }; SR_net::SR_net(string path, vector<int> input_size, bool fp32, bool cuda) { this->Ginput_size = input_size; this->Gfp32 = fp32; clock_t startTime_, endTime_; startTime_ = clock(); session_options.SetIntraOpNumThreads(6); if (cuda) { OrtCUDAProviderOptions cuda_option; cuda_option.device_id = 0; cuda_option.arena_extend_strategy = 0; cuda_option.cudnn_conv_algo_search = OrtCudnnConvAlgoSearchExhaustive; cuda_option.gpu_mem_limit = SIZE_MAX; cuda_option.do_copy_in_default_stream = 1; session_options.AppendExecutionProvider_CUDA(cuda_option); } wstring widestr = wstring(path.begin(), path.end()); this->Gsession = new Session(env, widestr.c_str(), this->session_options); this->session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL); AllocatorWithDefaultOptions allocator; this->Ginput_names = { "input" }; this->Goutput_names = { "output" }; endTime_ = clock(); cout << " The model loading time is:" << (double)(endTime_ - startTime_) / CLOCKS_PER_SEC << "s" << endl; } int main() { vector<int> input_shape = {}; SR_net net("E:/prj/SR_C/onnx_file/rrdb_full.onnx", input_shape, true, true); },在这段代码中,我如何把SR_net net("E:/prj/SR_C/onnx_file/rrdb_full.onnx", input_shape, true, true);这一行写到主函数的外面?
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值