<!--
{
  "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/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLDynamicLibraryError"
  },
  "title" : "MTLDynamicLibraryError.Code"
}
-->

# MTLDynamicLibraryError.Code

Error codes that Metal can generate when creating dynamic libraries.

```
enum Code
```

## Topics

### Error codes

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

An error code that represents the absence of any problems.

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

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

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

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

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

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

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

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

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

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

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

An error code that represents the absence of any problems.

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

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

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

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

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

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

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

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

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

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



---

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)