Linker error when using SLD2 with MEXCUDA

1 visualización (últimos 30 días)
Moein Mozaffarzadeh
Moein Mozaffarzadeh el 8 de Oct. de 2021
Hi,
I want to use SDL in my CUDA code, but I'm having issues with compiling my code. To simplify, I'm just trying to initizlize SDL with "SDL_Init(SDL_INIT_VIDEO);" in my cuda code. I use the followings to compile the main code (TUI_Main.cu):
ipath2 = ['-I' fullfile('E:\compilers\SDL2-devel-2.0.16-mingw\SDL2-2.0.16\i686-w64-mingw32\include\SDL2')];
ipath3 = ['-L' fullfile('E:\compilers\SDL2-devel-2.0.16-mingw\SDL2-2.0.16\i686-w64-mingw32\lib ') '-lSDL2 ' '-lSDL2main'];
Flags=['NVCCFLAGS=-gencode=arch=compute_50,code=sm_50 -Xptxas -dlcm=cg'];
mexcuda('-R2018a','TUI_Main.cu',ipath2,ipath3,Flags );
here is the error:
Error using mex
Creating library TUI_Main.lib and object TUI_Main.exp
TUI_Main.obj : error LNK2019: unresolved external symbol SDL_Init referenced in function mexFunction
TUI_Main.mexw64 : fatal error LNK1120: 1 unresolved externals
could you please let me know what is it that I'm missing?
Moein.

Respuestas (0)

Categorías

Más información sobre GPU CUDA and MEX Programming en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by