getting link error in mex or cuda

2 views (last 30 days)
Abeera Tariq
Abeera Tariq on 3 Jun 2015
Answered: Joss Knight on 15 Jun 2015
I am trying to compile a cuda file but getting the error in linkage
>> nvmex -f nvmexopts.bat -IF:\cuda\include -LF:\cuda\lib -lcudart
Warning: cudart specified with -l option not found on -L path
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
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 Comment
James Tursa
James Tursa on 3 Jun 2015
Do you have a mexFunction in your code?

Sign in to comment.

Answers (1)

Joss Knight
Joss Knight on 15 Jun 2015
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:

Community Treasure Hunt

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

Start Hunting!