MEX Files still open in Matlab

Hello,
I'm actually compiling CUDA mex files in Matlab by first using the system command nvcc (which is Nvidia's compiler for CUDA C code) to compile my .cu code into .cpp code, and then using the mex command to compile that into mex code. It will work out fine until I try to make some changes and then recompile. When I do , I get the Link: fatal error LNK1104 error where it says that it can't open the target mex file. Even when I try to delete the existing .mexw64 file, it says that the file is still open in Matlab. Once I restart Matlab, I can recompile. How can I remedy this error?
Thanks, Matt

 採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 26 日

4 投票

Before recompiling, at the MATLAB command line, command
clear functions

5 件のコメント

Kaustubha Govind
Kaustubha Govind 2012 年 1 月 26 日
Or "clear mex"
Walter Roberson
Walter Roberson 2012 年 1 月 26 日
"clear mex" is not documented for the version I am using so I thought it better to use the official command.
Jan
Jan 2012 年 1 月 26 日
It is documented in 2011b. Now the same old problem: There is still no tinySQL or SQLite database for the list of changes. Such a database could easily answer the question, which function changed in which release. It would be useful, if the database can be updated even without a service contract.
Raja Subramani
Raja Subramani 2019 年 2 月 1 日
tnq so much for u r answer....
xingxingcui
xingxingcui 2020 年 9 月 29 日
thanks,it works!

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

その他の回答 (1 件)

Matt
Matt 2012 年 1 月 27 日

0 投票

thank you very much. This works!

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

製品

タグ

質問済み:

2012 年 1 月 26 日

コメント済み:

2020 年 9 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by