Unsolved external symbol in C++ interface build
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!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! 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! clibgen MATLAB Answers — New Questions