Using matlab created C++ .lib file in VS 2017

1 回表示 (過去 30 日間)
Xuechu Xu
Xuechu Xu 2018 年 7 月 2 日
コメント済み: Xuechu Xu 2018 年 7 月 9 日
Hello, I am using Matlab 2018a to creat C++ libarires, I can compile the created file, but when I debug it allert that "0x000001CA70A203B4 induces error (located in Project1.exe): 0xC0000005: access confilct when reading address 0x0000000000000000 " (I don't know wheter I wrote this correctly because my version language isn't English). I wonder how could I solve it?
The detail information: 1. I have a matlab function add.m. I set "mex -setup" and "mbuild -setup" to C++.
2. I use mcc -W cpplib:add -T link:lib add.m to generate C++ files and succeeded.
3.I created a C++ project in VS 2017, add the matlab extern include and lib files, and add the created .h .lib .dll files, then set the compile environment to x64.
4.When debug, it has such error,
which says the frame is not in the module. Error induced ,"0x000001CA70A203B4 induces error (located in Project1.exe): 0xC0000005: access confilct when reading address 0x0000000000000000 ".

採用された回答

Wentao Du
Wentao Du 2018 年 7 月 5 日
  1 件のコメント
Xuechu Xu
Xuechu Xu 2018 年 7 月 9 日
Thanks for your kind help, I will try it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by