필터 지우기
필터 지우기

Linker error when using SLD2 with MEXCUDA

조회 수: 2 (최근 30일)
Moein Mozaffarzadeh
Moein Mozaffarzadeh 2021년 10월 8일
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개)

카테고리

Help CenterFile Exchange에서 GPU CUDA and MEX Programming에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by