Linker error when using SLD2 with MEXCUDA
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu GPU CUDA and MEX Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!