# macho: fix linking of dylibs and frameworks · gitcafe/zig

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

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

Visibility: public

Requested revision: f2bf1390a29a9decaa5ca49d3ae720b360583b35

Requested commit: f2bf1390a29a9decaa5ca49d3ae720b360583b35

Commit: f2bf1390a29a9decaa5ca49d3ae720b360583b35

Tree: f040031c1ee692eef0b5d1e52fda6cfcdf265bbe

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: fix linking of dylibs and frameworks

Previously, I have incorrectly assumed that with two-level namespace
we only need to link in dylibs/frameworks that actually export symbols
which are undefined in the linked image. Turns out, regardless of
whether we link with two-level namespace (default on macOS) or a
flat namespace (more common on other platforms), we always need to
put the dylibs/frameworks as specified by the user from the linker
line into the final linked image.

```

## Parents

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

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