<!--
{
  "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

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

An error code that represents the absence of any problems.

[`MTLDynamicLibraryErrorInvalidFile`](/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.

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

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

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

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

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

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

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

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

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

An error code that represents the absence of any problems.

[`MTLDynamicLibraryErrorInvalidFile`](/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.

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

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

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

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

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

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

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

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

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)