Closed leo60228 closed 2 years ago
Hm. This is what I feared would happen. I've yanked 1.6.6 for the time being and should have a solution later today (but so long as no-one upgraded to 1.7.x without building and still specs =1.6, this should fix it for now); soz!
I haven't been able to build the crate to the end due to
running: "clang++" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "--target=x86_64-pc-windows-gnu" "-I" "libui//common" "-I" "libui//windows" "-Wall" "-Wextra" "-o" "T:\\libui-rs\\target\\debug\\build\\ui-sys-de9fe2796c2cc100\\out\\libui/windows/areadraw.o" "-c" "libui/windows/areadraw.cpp"
cargo:warning=libui/windows/areadraw.cpp:81:7: error: case value evaluates to 2291728396, which cannot be narrowed to type 'HRESULT' (aka 'long') [-Wc++11-narrowing]
cargo:warning= case D2DERR_RECREATE_TARGET:
cargo:warning= ^
cargo:warning=d:/Programy/Programowanie/msys2/mingw64/x86_64-w64-mingw32/include/d2derr.h:30:33: note: expanded from macro 'D2DERR_RECREATE_TARGET'
cargo:warning=#define D2DERR_RECREATE_TARGET 0x8899000C
cargo:warning= ^
cargo:warning=libui/windows/areadraw.cpp:108:61: warning: unused parameter 'lParam' [-Wunused-parameter]
cargo:warning=BOOL areaDoDraw(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
cargo:warning= ^
cargo:warning=1 warning and 1 error generated.
exit code: 1
but by inserting a panic at the right time I've proved well enough, for me, that it works as-expected now – i.e. links to library iff there are no binaries.
If you could validate this by trying on your machine that accepts the aforementioned error and goes to completion by pointing it at the master
branch (at least b39869d15e9fc3283a26c4b6ddbb1a7db083bad8), I'll release this as 1.7.1, yank 1.7.0 and backport to 1.6.7.
Yep, it works!
The fix for #42 regresses crates that don't have a binary target: