필터 지우기
필터 지우기

getting link error in mex or cuda

조회 수: 1 (최근 30일)
Abeera Tariq
Abeera Tariq 2015년 6월 3일
답변: Joss Knight 2015년 6월 15일
I am trying to compile a cuda file but getting the error in linkage
>> nvmex -f nvmexopts.bat AddVectors.cu -IF:\cuda\include -LF:\cuda\lib -lcudart
Warning: cudart specified with -l option not found on -L path
AddVectors.cu
tmpxft_00000fb4_00000000-8_AddVectors.compute_13.cudafe1.gpu
tmpxft_00000fb4_00000000-12_AddVectors.compute_13.cudafe2.gpu
AddVectors.cu
tmpxft_00000fb4_00000000-6_AddVectors.compute_10.cudafe1.gpu
tmpxft_00000fb4_00000000-16_AddVectors.compute_10.cudafe2.gpu
AddVectors.cu
tmpxft_00000fb4_00000000-3_AddVectors.compute_20.cudafe1.gpu
tmpxft_00000fb4_00000000-20_AddVectors.compute_20.cudafe2.gpu
AddVectors.cu
AddVectors.cu
AddVectors.cu
tmpxft_00000fb4_00000000-8_AddVectors.compute_13.cudafe1.cpp
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
AddVectors.obj
LINK : error LNK2001: unresolved external symbol mexFunction
C:\Users\abeera\AppData\Local\Temp\mex_jKYTU6\templib.x : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2013A\BIN\NVMEX.PL: Error: Link of 'AddVectors.mexw64' failed.
Error using nvmex (line 206)
Unable to complete successfully.
  댓글 수: 1
James Tursa
James Tursa 2015년 6월 3일
Do you have a mexFunction in your code?

댓글을 달려면 로그인하십시오.

답변 (1개)

Joss Knight
Joss Knight 2015년 6월 15일
nvmex has been superseded by native mex support for CUDA MEX functions. Compile your function using mex by following the instructions in the documentation:
Here is a blog article to help you get going:

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by