compiling MEX unresolved external symbol
显示 更早的评论
When i try to compile some file with mex function in matlab, i get this error:
compile_command =
mex -DCOMPILE_VISUALIZATION -I"C:\local\boost_1_59_0" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" -L"./lib/" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" -L"C:\local\boost_1_59_0\lib64-msvc-14.0" -L"./lib/" -llibParallelFDTD -lVoxelizer -lcudart -lcuda -lfreeglut -lglew32 -llibboost_thread-vc140-mt-1_59 -llibboost_system-vc140-mt-1_59 -llibboost_chrono-vc140-mt-1_59 -llibboost_date_time-vc140-mt-1_59 -llibmx -llibut
Building with 'Microsoft Visual C++ 2015 Professional'.
Error using mex
Creating library mex_FDTD.lib and object mex_FDTD.exp
mex_FDTD.obj : error LNK2019: unresolved external symbol "public: void __cdecl FDTD::App::runVisualization(void)"
(?runVisualization@App@FDTD@@QEAAXXZ) referenced in function mexFunction
mex_FDTD.mexw64 : fatal error LNK1120: 1 unresolved externals
Error in compileWIN (line 39)
eval([compile_command ' mex_FDTD.cpp']);
I found that problem is related to runVisualization function but i could not find the reason. When this function is commented in mex_FDTD.cpp file,
eval([compile_command ' mex_FDTD.cpp'])
is working but some errors occurs than when running main project file in matlab.
I've been stuck with this problem, I'll be thankful for any suggestions and comments.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 External Language Interfaces 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!