Could not find file AMCongifLib.h (Header File); Error in => AMConfigToolApp.mlapp at line 3193
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to execute a standalone app from the app designer on Matlab 2022A. I am trying to load an external library (.dll file) and its header file (.h file) using the load library, here is my code for loadlibrary attached:
% Initialization of the DLL library
function initialLibrary(app)
% import (load) the dynamic DLL library
addpath('..\..\Build\Temp64\');
addpath('.\Build\Temp64\');
if not(libisloaded('AMConfigLib'))
loadlibrary('AMConfigLib.dll','AMConfigLib.h');
end
end
However, when I choose to open the generated standalone app, it got crashing and displayed the error message as shown in the picture:
Here is the code in line 3193:
I assume there is some issue with the loadlibrary, because I didn't see anything from my current folder and workspace after typing the presented code in the matlab command window.
0 个评论
回答(1 个)
Adithya
2023-9-7
Hello @Corey, I understand from your question that you are trying to load a shared library built with MATLAB using loadlibrary inside MATLAB.
However, according to the MATLAB documentation you cannot use loadlibrary inside MATLAB to load a shared library built with MATLAB. You may want to check the documentation for more information on how to properly load a shared library in deployed applications. If you encounter errors testing your application, ensure MATLAB Runtime is installed correctly.
Link to documentation :
https://www.mathworks.com/help/compiler/matlab-library-loading.html,
I hope this helps you. Let me know if you have any further questions!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!