Skip to content

Commit 6b243aa

Browse files
committed
Try again to fix windows
1 parent 058bce7 commit 6b243aa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/cxx/build-and-run-crashinfo.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ $SCRIPT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Path
77
& "$SCRIPT_DIR\build-and-run.ps1" `
88
-CrateName "libdd-crashtracker" `
99
-ExampleName "crashinfo" `
10-
-ExtraMsvcLibs "dbghelp.lib psapi.lib ole32.lib powrprof.lib" `
11-
-ExtraGnuLibs "-ldbghelp -lpsapi -lole32 -lpowrprof" `
12-
-ExtraMsvcFlags "/MD"
10+
-ExtraMsvcLibs "dbghelp.lib psapi.lib powrprof.lib" `
11+
-ExtraGnuLibs "-ldbghelp -lpsapi -lole32 -lpowrprof"
1312

1413
exit $LASTEXITCODE

examples/cxx/build-and-run.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ if ($USE_MSVC) {
126126
Write-Host "Using MSVC compiler" -ForegroundColor Yellow
127127

128128
# Build the compile command
129+
# Note: /MD is required to match Rust's dynamic CRT (default on Windows)
129130
$MsvcArgs = @(
130-
"/std:c++20", "/EHsc"
131+
"/std:c++20", "/EHsc", "/MD"
131132
)
132133

133134
# Add extra MSVC flags if specified
@@ -143,7 +144,7 @@ if ($USE_MSVC) {
143144
$ExampleCpp,
144145
$CRATE_LIB,
145146
$CXX_BRIDGE_LIB,
146-
"ws2_32.lib", "advapi32.lib", "userenv.lib", "ntdll.lib", "bcrypt.lib"
147+
"ws2_32.lib", "advapi32.lib", "userenv.lib", "ntdll.lib", "bcrypt.lib", "ole32.lib"
147148
)
148149

149150
# Add extra MSVC libraries if specified

0 commit comments

Comments
 (0)