<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDynamicLibraryError-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:SC22MTLDynamicLibraryErrorLeV"
  },
  "title" : "MTLDynamicLibraryError"
}
-->

# MTLDynamicLibraryError

Errors when compiling dynamic libraries.

```
struct MTLDynamicLibraryError
```

## Topics

### Error codes

[`none`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/none)

An error code that represents the absence of any problems.

[`invalidFile`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/invalidFile)

An error code that indicates an app is using an invalid reference to a library file, typically related to a URL.

[`compilationFailure`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/compilationFailure)

An error code that indicates Metal couldn’t compile a dynamic library.

[`unresolvedInstallName`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/unresolvedInstallName)

An error code that indicates Metal couldn’t resolve the installation name for a new dynamic library.

[`dependencyLoadFailure`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/dependencyLoadFailure)

An error code that indicates a dynamic library couldn’t link to other dynamic libraries.

[`unsupported`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/unsupported)

An error code that indicates the GPU device doesn’t support dynamic libraries.

[`MTLDynamicLibraryError.Code`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/Code)

Error codes that Metal can generate when creating dynamic libraries.

### Error domain

[`errorDomain`](/documentation/Metal/MTLDynamicLibraryError-swift.struct/errorDomain)

The current dynamic library error domain.

[`MTLDynamicLibraryDomain`](/documentation/Metal/MTLDynamicLibraryDomain)

The domain for Metal dynamic library errors.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)