Linker error when using SLD2 with MEXCUDA
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU CUDA and MEX Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!