diff --git a/build.zig b/build.zig index bf4179ae0..f417039f3 100644 --- a/build.zig +++ b/build.zig @@ -462,12 +462,15 @@ fn addDeps( // Other dependencies, we may dynamically link if (static) { const zlib_step = try zlib.link(b, step); + try static_libs.append(.{ .generated = &zlib_step.output_path_source }); + const libpng_step = try libpng.link(b, step, .{ .zlib = .{ .step = zlib_step, .include = &zlib.include_paths, }, }); + try static_libs.append(.{ .generated = &libpng_step.output_path_source }); // Freetype const freetype_step = try freetype.link(b, step, .{ @@ -483,6 +486,7 @@ fn addDeps( .include = &zlib.include_paths, }, }); + try static_libs.append(.{ .generated = &freetype_step.output_path_source }); // Harfbuzz const harfbuzz_step = try harfbuzz.link(b, step, .{ diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index a766f2c0e..f9a804993 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -292,6 +292,7 @@ "@executable_path/../Frameworks", ); MARKETING_VERSION = 0.1; + "OTHER_LDFLAGS[arch=*]" = "-lstdc++"; PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -323,6 +324,7 @@ "@executable_path/../Frameworks", ); MARKETING_VERSION = 0.1; + "OTHER_LDFLAGS[arch=*]" = "-lstdc++"; PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES;