mirror of
https://github.com/ziglang/zig.git
synced 2025-12-10 16:23:07 +00:00
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.
8 lines
149 B
C
8 lines
149 B
C
#include <assert.h>
|
|
#include <objc/runtime.h>
|
|
|
|
int main() {
|
|
assert(objc_getClass("NSObject") > 0);
|
|
assert(objc_getClass("NSApplication") > 0);
|
|
}
|