const std = @import("std"); pub fn main() !void { // Load the shared library var lib = try std.DynLib.open("./zig-out/lib/libshared.so"); defer lib.close(); std.debug.print("Loaded that shizz\n", .{}); const test_debug_print = lib.lookup(*const fn () callconv(.c) void, "test_debug_print") orelse { return error.CantFindIt; }; std.debug.print("test_debug_print found... calling...\n", .{}); // Call the function from the shared library test_debug_print(); std.debug.print("called \n", .{}); }