Skip to content

Commit

Permalink
fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kbkpbot committed Jan 3, 2025
1 parent d2d0930 commit dc2d152
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -6094,6 +6094,13 @@ fn (mut g Gen) write_init_function() {
defer {
util.timing_measure(@METHOD)
}

// Force generate _vinit_caller, _vcleanup_caller , these are needed under Windows,
// because dl.open() / dl.close() will call them when loading/unloading shared dll.
if g.pref.is_liveshared && g.pref.os != .windows {
return
}

fn_vinit_start_pos := g.out.len

// ___argv is declared as voidptr here, because that unifies the windows/unix logic
Expand Down

0 comments on commit dc2d152

Please sign in to comment.