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.

답변 (1개)

Adithya
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!

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by