Resolve Build Error: Unresolved External Symbols
When publishing a MATLAB® interface to a C++ library, MATLAB compiles and builds C/C++ code. If the library files or supporting source files contain unresolved external symbols, a linker error occurs when you publish the interface.
The linker error message text depends on your platform and can reference a construct, such as a function, method, or variable.
|Platform||Linker Error Message|
Microsoft® Visual Studio®
Message contains error
Message includes this phrase regarding a construct:
Message includes this phrase:
The unresolved external symbols issue can have several possible causes and solutions, including:
Compiler mismatch — Verify that the compiled library file you chose is compiled with the compiler you specified in the Generate C++ Interface C++ compiler parameter.
Incomplete files — Verify that the supplied library files or supporting source files are complete and contain full construct definitions.
Unrelated files — Verify that the supplied library files or supporting source files belong to the library.
For more possible causes and solutions, see this Microsoft article: Linker Tools Error LNK2019.