当前位置:网站首页>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
边栏推荐
猜你喜欢

Vscode custom comments

卷积神经网络实现CIFAR100数据集分类

Eigen 学习总结
![[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture](/img/ef/173281ffb354b9abe1b730b89469cc.png)
[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture

深蓝学院激光slam 理论与实践 第三章激光雷达去畸变 作业习题
![[UDS unified diagnostic service] II. Network layer protocol (1) - overview and functions of network layer](/img/39/30bb897ff4467105de08c8c1c737ab.png)
[UDS unified diagnostic service] II. Network layer protocol (1) - overview and functions of network layer

File viewing commands and user management commands
逻辑回归原理及代码实现

CUDA环境安装

基于VGG卷积神经网络的图像识别代码实现
随机推荐
浮点数双精度,单精度以及半精度知识总结
realsense 选型大对比D455 D435i D415 T265 3D硬件对比
C语言进阶要点笔记5
Generate random number
利用文件保存数据(c语言)
友元函数,友元类,类模板
Wechat applet request encapsulation
cv_bridge 与opencv 版本不匹配的解决
C语言实现memcpy、memset、strcpy、strncpy、strcmp、strncmp、strlen
GDB debugger installation and use
[UDS unified diagnosis service] IV. typical diagnosis service (3) - read fault information function unit (storage data transmission function unit)
C语言进阶要点笔记2
进程间通信-互斥锁
类和对象的初始化(构造函数与析构函数)
三极管原理及特性分析
[ThreadX] h743 + ThreadX + Filex migration record
CUDA环境安装
【UDS统一诊断服务】四、诊断典型服务(4)— 在线编程功能单元(0x34-0x38)
生成验证码
MOS管特性和导通过程