I use 64-bit MATLAB Compiler C++ 4.6 (R2007a) to build a C++ shared library "libmatrixp.dll". When I build the driver "matrixdriver.cpp" on 64-bit Windows in Microsoft Visual Studio 2005, after properly setting the link and include paths, I receive link errors:
1>------ Build started: Project: matrixtest, Configuration: Debug Win32------ 1>Compiling... 1>matrixdriver.cpp 1>Compiling manifest to resources... 1>Linking... 1>matrixdriver.obj : error LNK2019: unresolved external symbol _mclTerminateApplication referenced in function __catch$?run_main@@YAPAXPAX@Z$0 1>matrixdriver.obj : error LNK2019: unresolved external symbol _libmatrixpTerminate referenced in function __catch$?run_main@@YAPAXPAX@Z$0 1>matrixdriver.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl eigmatrix(int,class mwArray &,class mwArray const &)" (__imp_?eigmatrix@@YAXHAAVmwArray@@ABV1@@Z) referenced in function "void * __cdecl run_main(void *)" (?run_main@@YAPAXPAX@Z) 1>matrixdriver.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl multiplymatrix(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?multiplymatrix@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function "void * __cdecl run_main(void *)" (?run_main@@YAPAXPAX@Z) 1>matrixdriver.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl addmatrix(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?addmatrix@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function "void * __cdecl run_main(void *)" (?run_main@@YAPAXPAX@Z) 1>matrixdriver.obj : error LNK2019: unresolved external symbol _libmatrixpInitialize referenced in function "void * __cdecl run_main(void *)" (?run_main@@YAPAXPAX@Z) 1>matrixdriver.obj : error LNK2019: unresolved external symbol _mclInitializeApplication referenced in function "void * __cdecl run_main(void *)" (?run_main@@YAPAXPAX@Z)
Best Answer