Windows 10 (64-bit) implements Vs20120c++ called the. dll,.lib,.h file generated by the M file written by Matlab r2014a

Source: Internet
Author: User

Title.
Environment: WINDOWS10 64-bit, vs 2010,matlab r2014a, configuration succeeded, build. dll,.h,.lib file succeeded.

Step one: Matlab dynamic link library file compilation build
1) write the sample file add.m
function c = Add (A, b);
c = a + B;
End
2) Compile and package
Enter the MATLAB main interface, enter the Deploytool command in the console, call the Packager, select "Library Compiler":

3) Enter the library file compiler interface, tick the C + + Shared library option as needed, add the. m file to generate the dynamic link library, tick

4) Stand-alone Settings button to configure additional compilation generation control commands (not considered) and package file output path
5) Single package, start compiling, packaged successfully, you can see the generated add.dll add.h add.lib file in the build directory of the setup.

Step Two: Create a new VS2010 project and make the relevant configuration
1) New Empty Project
2) Set the solution build mode to release, the solution build platform is set to x64 (if only Win32 is set on the platform after release, it can be set in Configuration Manager):

3) Configure project Properties
c/c++/General/Additional include directory, enter the Include folder path under the MATLAB installation directory (if you do not have a C + +, you can now add CPP files in the project)
D:\Program Files\matlab\r2014a\extern\include

Linker/General/Additional library directory, enter the Microsoft folder path under the MATLAB installation directory
D:\Program Files\matlab\r2014a\extern\lib\win64\microsoft

Linker/input/Additional dependencies, enter the following 5 lib files:


The above project configuration is complete

Step One possible problem:
1)
Reason: matlab cracked incomplete
Full activation, including replacement of 3 files in the MATLAB installation directory and JAR files


2) Internal Error:zero length license information
Cause: MATLAB is not activated
After MATLAB installation, you can choose to activate and activate the file:

or activate when you first start MATLAB
Some references:
Http://www.ithao123.cn/content-10197080.html

Windows 10 (64-bit) implements Vs20120c++ called the. dll,.lib,.h file generated by the M file written by Matlab r2014a

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.