当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
【UDS统一诊断服务】四、诊断典型服务(3)— 读故障信息功能单元(存储数据传输功能单元)
Camera calibration: key point method vs direct method
Figure guessing game
[opencv] use filestorage to read and write eigenvectors
Qt 添加QSerialPort类 实现串口操作
声明为全局变量
For() loop parameter call order
C语言实用小技巧合集(持续更新)
C语言的运算符
C语言代码规范
Tabbar implementation of dynamic bottom navigation bar in uniapp, authority management
在visual stdio中运行qt程序
C语言 #和##的使用
cv_bridge 与opencv 版本不匹配的解决
[UDS unified diagnosis service] IV. typical diagnosis service (3) - read fault information function unit (storage data transmission function unit)
ArcGIS license错误-15解决方法
共用数据的保护
[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture
搭建openstack平台
猜數字遊戲








