# Fix "unable to generate DLL import \.lib file" · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/dbb11915bd03992ff9b64cd7f373faa428f0cedf)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: dbb11915bd03992ff9b64cd7f373faa428f0cedf

Requested commit: dbb11915bd03992ff9b64cd7f373faa428f0cedf

Commit: dbb11915bd03992ff9b64cd7f373faa428f0cedf

Tree: 70556470246c0c54fa1e03a46c107ff737eff267

Author: Andreas Herrmann

Committer: Veikka Tuominen

## Message

````
Fix "unable to generate DLL import .lib file"

Closes https://github.com/ziglang/zig/issues/19284

As of 9f2cb920c055bc990cc9d593b8dc9eaa450d07b9 configuring the global
cache directory to a relative path causes errors of the following form
when cross compiling to `windows-gnu`.
```
error: unable to generate DLL import .lib file for kernel32: FileNotFound
```

The issue occurred because the `def_final_path` included the global
cache path as a prefix and later on the `def_final_file` was created
using that path with the global cache directory handle.

````

## Parents

- [fe61b19b9667bcd9f4ce507683bcc224d5dad1de](https://git.cafe/gitcafe/zig/commit/fe61b19b9667bcd9f4ce507683bcc224d5dad1de?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/dbb11915bd03992ff9b64cd7f373faa428f0cedf?format=markdown)
