Info

此问题已关闭。 请重新打开它进行编辑或回答。

Compilation on R2014a don't work

1 次查看(过去 30 天)
Sid
Sid 2014-7-10
关闭: MATLAB Answer Bot 2021-8-20
Hi,
I have run the following command on R2010b and it works fine with the C++ wrapper (using VS C++ 2010):
setenv('TEMP', 'C:\TEMP'); % compile and export the DST Lite functions mcc -v -W cpplib:libmatlab -T link:lib Data_lite.m ... getLiteData.m... -v
However, when I run the command on R2014a, it does not work with the C++ wrapper. I can't figure out why. Can someone help? Thank you in advance.

回答(1 个)

Nidhi Jain
Nidhi Jain 2014-7-14
Hi Sid,
There are chances that you are not using a third party supported compiler. The compiler could be working for R2010b but may be not for R2014a. You can check the list of supported compilers for R2014a here:
Make sure you have one of these installed.
If the compiler seems to be fine, provide the error message you are receiving and also the complete command you are trying to execute.
You can also use the "deploytool" to compile the MATLAB code into C++ shared library:
1. Enter "deploytool" on your MATLAB command window.
2. In the "Add Exported Function", add the .m file
3. Select "C++ shared library" option form the list to the left of "Add Exported Function"
4. Add any other files needed in the "Files required for your application to run" section.
4. Click "Package"
This will create 3 subfolders within the folder named as your .m file. The DLL will be present in the folder "for_redistribution_files_only" and "for_testing"

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by