Unsolved external symbol in C++ interface build

2 views (last 30 days)
I have a C++ function which I can load on MATLAB with
loadlibrary('nc_driver_x64')
and this works without problem using calllib.
On the other hand, if I try to create interface of the same function like this
clibgen.generateLibraryDefinition(fullfile(workPath,'nc_driver_x64.h'),...
"IncludePath", workPath,...
"Libraries", {fullfile(workPath,'nc_driver_x64.lib'), fullfile(workPath,'nc_driver_x64.dll')},...
"Verbose",true)
It generates definenc_driver_x64.m and definenc_driver_x64.mlx, but then
build(definenc_driver_x64)
returns nc_driver_x64Interface.obj : error LNK2019: on all functions in this file.
.h, .lib and .dll files are all in the same folder and running on R2021b
I really appreciate if you could point out what I should check to make this work!

Answers (0)

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!