필터 지우기
필터 지우기

running builded file returns error message

조회 수: 4 (최근 30일)
Alex
Alex 2012년 5월 2일
댓글: Stefanie Schwarz 2019년 4월 23일
Hello,
I have used build model option to create windows executable file from Simulink. The executable was successfully created, but when I run it from command line it returns following message: "ErrorStatus set: "Could not open library: networkdevice.dll" My model contains only 2 blocks: sine wave connected to the UDP Send block for windows, taken from Simulink Coder library. Running my model from Simulink environment works correctly. Machine: windows XP ver 5.1 build 2600 SP2, 32 bit. Matlab ver: 7.12.0.635 Simulink coder ver 8.0
Thank you in advance. Yours sincerely, Al

답변 (2개)

Egon
Egon 2012년 10월 1일
I have the same problem.

Ketan
Ketan 2012년 10월 8일
Hi Al and Egon,
Some Simulink blocks implement portions of their functionality using shared libraries (DLL files on Windows). Additionally, in some cases EXEs generated from models using these blocks are dependent on these shared libraries as well. In this case it seems like the Simulink UDP Send block has some of these dependencies.
The PACKNGO function can be used to locate the needed shared libraries. Go into your modelname_target_rtw folder and load the 'buildInfo' object into the workspace from the "buildInfo.mat" file. Then you can execute the command
>> packNGo(buildInfo);
This will create compressed folder in the same directory containing the generated EXE. This compressed folder should contain any DLLs that the generated EXE is dependent on. When running the EXE outside of the MATLAB/Simulink environment these DLLs need to be on the system path or within the same directory as the EXE.
  댓글 수: 2
Iain
Iain 2015년 1월 15일
I have done all this and the .dll is in the correct folder but when I step through the code I still get the error message "Could not open library: networkdevice.dll". Any ideas?
Stefanie Schwarz
Stefanie Schwarz 2019년 4월 23일
Make sure that not only the "networkdevice.dll" file is copied to the same directory as the EXE, but all DLLs contained in the packNGo archive.
See below MATLAB Answers post for more information:

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

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by