MATLAB Answers

Matlab Engine demo Linker errors

3 views (last 30 days)
Alexander Vandenberghe
Alexander Vandenberghe on 26 Nov 2018
Answered: Evert Cooper on 8 Dec 2019
When i try to run the matlab engine demo in visual studio (Visual C++ 2010 express) I keep getting these linker errors.
1>------ Build started: Project: matlabEngineDemo, Configuration: Debug Win32 ------
1>engwindemo.obj : error LNK2019: unresolved external symbol _mxDestroyArray referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _mxGetPi referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engClose referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engGetVariable referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engOutputBuffer referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engEvalString referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engPutVariable referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _mxGetPr referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _mxCreateDoubleMatrix_730 referenced in function _WinMain@16
1>engwindemo.obj : error LNK2019: unresolved external symbol _engOpen referenced in function _WinMain@16
1>C:\Users\A.Vandenber\documents\visual studio 2010\Projects\matlabEngineDemo\Debug\matlabEngineDemo.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What additional settings do I need to apply in order to call the matlab engine?
Thanks!

  0 Comments

Sign in to comment.

Answers (1)

Evert Cooper
Evert Cooper on 8 Dec 2019
I have the same problem. I am attempting to run the R2019b Matlab engdemo.c , and get linking errors also. This is what I get on the command line after inputting mex engdemo.c i.e.,
mex engdemo.c
Building with 'Microsoft Visual C++ 2017 (C)'.
Error using mex
LINK : error LNK2001: unresolved external symbol mexFunction
engdemo.lib : fatal error LNK1120: 1 unresolved externals
Is this simply a Matlab bug, or has someone else had better luck? How does one debug this problem?
Evert Cooper

  0 Comments

Sign in to comment.

Categories

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by