Some model build issues are caused by linking to dynamic link libraries (.dll).
When building real-time applications, the Simulink® Real-Time™ software supports links to static link libraries (.lib) only, not links to dynamic link libraries (.dll), such as Windows® libraries. Building a real-time application from a model with links to one or more DLLs produces a build error.
When you build your models, check that you link to only static link libraries. When you compile with Simulink Real-Time S-functions, linking to static libraries avoids the dependency issues that occur in dynamic libraries. Each static library must be self contained. The static library must not be dependent on another external library.