当前位置:网站首页>CUDA project encountered a series of compilation problems after changing the environment (computer)
CUDA project encountered a series of compilation problems after changing the environment (computer)
2022-04-23 06:43:00 【~Ha】
Environmental statement
The original environment :cuda10.0
New environment :cuda10.2
Although the two versions are very close , But directly put cuda10.0 The project is packaged into 10.2 There will be a series of problems in running . Because of the new contact cuda No , Write these questions slightly .
Question 1 : Unable to load project
Open for the first time from 10.0 The copied project vs Prompt loading failed
resolvent : Right click the project name —>> edit , Search the open page for 10.0 Replace all with 10.2 ( The original cuda yes 10.0 edition , The new environment is 10.2 edition )
This is a cuda Caused by an inconsistent version
Question two : Can't find h、lib file
h Some of the documents are written by themselves , There are plenty of them cuda Self contained , You need to add these two h Path to file
lib The file also reported an error due to the absence of a path
resolvent : Right click the item name –>> attribute –>> Configuration properties –>>vc++ Catalog After opening, you can see many directories , Here we need to use the include directory and Library Directory , take h Add the path of the file to the include directory , take lib Add the directory of the file to the Library Directory
Question 3 : Unrecognized external symbol
After solving problem 2, compile again , Prompt unrecognized external symbols , Are some of the common cuda Functions such as cudaEventCreate、cudaEventSynchronize etc.
resolvent : Right click the item name –>> attribute –>> Configuration properties –>> The linker –>> Additional dependency Add what you need cuda Library filename
Some common ones are :
cublas.lib
cuda.lib
cudadevrt.lib
cudart_static.lib
cudart.lib
Be careful : If you write it yourself lib The file should also be added here
Question 4 : Can't find dll file
There are two scenarios : One is written by yourself dll file ; The other is cuda Self contained dll file
Case one : The simplest solution is to write your own dll Copy the file to the output folder of the project , That is to say, generate exe Where the papers are
The second case : find cuda Installation directory , Refer to the below , Finally open bin Folder
Carry out the following operations according to the prompted information , For example, my hint is that I can't find cudart64_100.dll Document and cublas64_100.dll file
find bin Folder and prompt can not be found dll Files with similar file names , For example, we can't find cudart64_100.dll, however bin There are cudart64_102.dll file , Then make a copy cudart64_102.dll Change file name to cudart64_100.dll, Put it in the same way bin Under the folder .cublas64_100.dll Operate like a file , The above figure shows the after the copy is completed .
版权声明
本文为[~Ha]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230548244839.html
边栏推荐
猜你喜欢
C [document operation] PDF files and pictures are converted to each other
卷积神经网络实现CIFAR100数据集分类
PHP junior programmers, take orders and earn extra money
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (2)
基于VGG对五种类别图片的迁移学习
三极管原理及特性分析
Graduation project, curriculum link, student achievement evaluation system
【UDS统一诊断服务】四、诊断典型服务(3)— 读故障信息功能单元(存储数据传输功能单元)
[UDS] unified diagnostic service (UDS)
FOC 单电阻采样 位置环控制伺服电机
随机推荐
类和对象的初始化(构造函数与析构函数)
clion安装教程
sqlite编译
数组旋转
Opencv uses genericindex for KNN search
Uniapp encapsulates request
C语言 #和##的使用
浮点数双精度,单精度以及半精度知识总结
【UDS统一诊断服务】四、诊断典型服务(4)— 在线编程功能单元(0x34-0x38)
C语言输入和输出(printf和scanf函数、putchar和getchar函数)
函数的调用过程
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
对象的动态建立和释放,赋值和复制
_findnext 报错
【UDS统一诊断服务】一、诊断概述(4)— 基本概念和术语
FOC SVPWM函数PWMC_SetPhaseVoltage解析
Matching between class template with default template argument and template parameter
copy constructor
Camera calibration: key point method vs direct method
TensorFlow张量介绍