Code covered by the BSD License  

Highlights from
Deploying a Shared Library

Be the first to rate this file! 37 Downloads (last 30 days) File Size: 6.93 KB File ID: #29443

Deploying a Shared Library

by

 

Example code for "Deploying Shared Libraries" posting in the "Art of MATLAB" blog.

| Watch this File

File Information
Description

This example code contains the source code for an application that encrypts and decrypts messages using the Vigenere cipher. The application consists of a C++ main program and several MATLAB functions. The MATLAB functions must be built into a C++ shared library by the MATLAB Compiler (see the blog post for details).

To build and run this example, you'll need:
* MATLAB
* The MATLAB Compiler
* A C++ compiler (gcc or Visual Studio).

Required Products MATLAB Compiler
MATLAB release MATLAB 7.11 (R2010b)
Other requirements C++ compiler, like gcc or Visual Studio.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
04 May 2013 Thuong

Thank you for sharing codes,
when I build MVS project, the following errors occur:
1>ClCompile:
1> vigenere.cpp
1>vigenere.obj : error LNK2019: unresolved external symbol _mclTerminateApplication_proxy referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _libvigenereTerminate referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl decrypt(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?decrypt@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl encrypt(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?encrypt@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _libvigenereInitialize referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _mclInitializeApplication_proxy referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _mclGetEmptyArray_proxy referenced in function "public: __thiscall mwArray::mwArray(void)" (??0mwArray@@QAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclcppGetLastError_proxy referenced in function "public: static void __cdecl mwException::raise_error(void)" (?raise_error@mwException@@SAXXZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclcppCreateError_proxy referenced in function "public: __thiscall mwException::mwException(void)" (??0mwException@@QAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _ref_count_obj_addref_proxy referenced in function "public: __thiscall mwException::mwException(class mwException const &)" (??0mwException@@QAE@ABV0@@Z)
1>vigenere.obj : error LNK2019: unresolved external symbol _ref_count_obj_release_proxy referenced in function "public: virtual __thiscall mwException::~mwException(void)" (??1mwException@@UAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _error_info_get_message_proxy referenced in function "public: virtual char const * __thiscall mwException::what(void)const " (?what@mwException@@UBEPBDXZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclGetString_proxy referenced in function "public: __thiscall mwArray::mwArray(char const *)" (??0mwArray@@QAE@PBD@Z)
1>vigenere.obj : error LNK2019: unresolved external symbol _char_buffer_get_buffer_proxy referenced in function "public: __thiscall mwString::operator char const *(void)const " (??BmwString@@QBEPBDXZ)

Could you know how can i fix it.
Thank you!

Contact us