Add the codes generated by MCC to VC and some VC settings.

Source: Internet
Author: User
Sender: xxhn (Hunan), email area: mathtools

Subject: Code Add VC and VC settings

Mailing station: BBS shuimu Tsinghua station (Wed Apr 30 14:19:59 2003)

These days, refer toArticleIn the new version of Matlab, VC settings are somewhat different.

To write these settings below, please add and correct the settings (Thank you for adding ljw)

My settings apply to both console project and MFC project:

1. Set the header file search path and library file path

In the menu tools -- options-directories, change show directories for to include files, and then add

Add

Search path. The installation path of MATLAB on the machine is:

MATLAB Root \ extern \ include

MATLAB Root \ extern \ include \ CPP

Change Show directories for to library files and add the search path:

MATLAB Root \ extern \ Lib \ Win32

MATLAB Root \ extern \ Lib \ Win32 \ Microsoft \ msvc60

After these options are set, they apply to each project.

2. Set some project options. Each project must be set once.

1. Under the menu project -- settings -- C/C ++, select "general" for "category" and "Preprocessor definitio"

Add msvc, ibnmpc, and mswind under NS

2. Under the menu project -- settings -- C/C ++, select "precompiled headers" for "category" and set "automatic"

Use of precompiled headers check box selected, in the through header, write stdafx. h

3. Under the menu project -- settings -- C/C ++, select "code generation" for "category", and select "use run-time l" for "use run-time l ".

In ibrary, select debug multithreaded DLL or multithreaded DLL.

The default value of the console project is debug singled-thread. If this parameter is not changed, there will be a lot of connection errors, while the MFC proj

By default, ECT is debug multithreaded DLL.

4. Select "input" for "category" under "project -- settings -- Link" and select "Object/library modules ".

Add libmmfile. Lib libmatlb. Lib libmx. Lib libmat. Lib libmatpm. Lib SGL. Lib libmw.

Sglm. Lib (if there is a problem, add a few more Lib: libeng. Lib libmatlbmx. Lib libmex. Lib

Libfixedpoint. Lib libmwarpack. Lib libmwlapack. Lib libmwmcl. Lib libmwrefblas. Lib

Libmwservices. Lib libut. Lib \

All the Lib under Microsoft \ msvc60 are added to your VC project, and you need to add the phproot \

Libmatpm. Lib under extern \ Lib \ Win32)

Enter msvcrt. Lib in ignore Libraries

the settings are complete. Under these settings, I successfully run a console project and an MFC project, and
you can add the code generated by MCC to the project, you can also call the C ++ Math library. In the MFC
project, I also called the MATLAB graphics library (SGL ), success
--
come on, baby!

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.