"The specified key is not present in this container" error when attempting to build a Simulink model with C Caller function blocks
조회 수: 69 (최근 30일)
이전 댓글 표시
Hi,
I have inserted some C Caller function blocks in a model which call functions from a dll located within a C:\Program Files directory on Windows.
Simulink didn't seem to like linking to the dll in its original installation location so I copied it and the matching .lib file to the Simulink project folder.
When I try to build the model, Simulink reports "The specified key is not present in this container", but it is not clear what it refers to. I suspect it is something to do with the configuration settings which I have attached here. If I generate a new configuration file without reference to the dll and add a sine wave block plus scope (C caller blocks are commented out), it builds.
Any ideas on what is causing the issue would be much appreciated.
댓글 수: 0
답변 (1개)
Mark McBroom
2021년 5월 8일
The configuration should only refer to the .lib file. This is the only file needed for linking. Use double quotes around the .lib path name to avoid having to copy the .lib file to the same directory as the model.
참고 항목
카테고리
Help Center 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!