opening a dll file with matlab

조회 수: 6 (최근 30일)
kay Dee
kay Dee 2020년 3월 7일
댓글: Walter Roberson 2020년 3월 7일
Hello Everyone
I have a dll file named (fape.dll) that contains some matlab codes and i would like to open it , can you please tell me how to open that file , in order to view codes that are inside .
Thank you very much .

답변 (1개)

Walter Roberson
Walter Roberson 2020년 3월 7일
dll files are compiled into machine code. They do not have any remaining MATLAB code.
In some ways of generating a dll from MATLAB code the MATLAB code is kept as comments in C or C++ source code. You would have to open the C or C++ source code to see it. C and C++ compilers do not store a copy of the code inside of a dll
  댓글 수: 2
kay Dee
kay Dee 2020년 3월 7일
@ walter Roberson
Thank you very much for your answer , but does it mean i need to find the C or C++ source code ?basically how do i get to see the content that is in a dll file .
thanks
Walter Roberson
Walter Roberson 2020년 3월 7일
but does it mean i need to find the C or C++ source code
Yes.
However, when the DLL was built, unless the compiler was told to strip the symbol table, then typically it would take a record of the name of each file that was used for each code location. Then, typically if you were to open the DLL in an Integrated Development Environment (IDE), and were to step through the code, then at each step the IDE would open the source code and move to the line of (C or C++) source; if you are lucky then you asked to have the MATLAB code recorded in the comments of that source.
However, this ability to automatically navigate to the appropriate source file requires that the source file is available to you: if all you have is a copy of the DLL, then you would not have that code.
Also, MATLAB can generate two different kinds of DLL from MATLAB code. One of the kinds of DLL construction compiles MATLAB code into threaded interpreted data structures that are evaluated by a copy of the MATLAB Execution Engine, very like executing inside MATLAB. There is no known way to access the code after this is done (except to happen to have a copy of the source code.) The second kind of DLL construction compiles MATLAB code to C or C++, that can then be compiled. This is the variety that just might permit you to read the original MATLAB code out of the comments of the C/C++ source.
Neither kind of DLL executes MATLAB code directly, only code that has been processed into a different form.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by