rust-native-ui / libui-rs

Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`
Apache License 2.0
927 stars 77 forks source link

Build failed on Windows with VS2015: unresolved external symbol #42

Open zoumi opened 5 years ago

zoumi commented 5 years ago

If I config libui using cmake, then use VS2015 to compile the generated solution file. I can compile it successfully. But cargo build doesn't. I have manually switch off BUILD_SHARED_LIBS in CMakeLists.txt I have found something about it: https://github.com/andlabs/libui/issues/412

my os: windows7 64 bit active toolchain: nightly-i686-pc-windows-msvc (default) rustc 1.31.0-nightly (78ff609d7 2018-10-19)

$ cargo build
   Compiling test_iui v0.1.0 (file:///H:/work/rust_projects/test_iui)
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LARGEADDRESSAWARE" "/SAFESEH" "/LIBPATH:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.10ygozpgsu0ud2lu.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.16u6js6g0l3k1ic6.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.181cuta0v63atwcm.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.1im38lueib99jsk0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.1y16o1qfye96o7m0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.22hgtdbdcu0u8p27.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.25eyya0j1gdwlbxr.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.287fjwldxriihryb.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.2yyg5bd89e3irycb.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3ayaeypdcro9d6yk.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3p4871ksc97vnnrn.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3rngp6bm2u2q5z0y.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3vv0q9obd6w3595h.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.3wta9ctgdrpkmlpr.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4e37gusgw81ck2ot.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4oc10dk278mpk1vy.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4xq48u46a1pwiqn7.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4yekh4a49ri9ikb0.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4yh8x2b62dcih00t.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.4ypvbwho0bu5tnww.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.8xzrsc1ux72v29j.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.98g0d9x8aw3akpe.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.9elsx31vb4it187.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.c6lbtaiefvx3wya.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.uj1kr5j3wr6o9sy.rcgu.o" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.y08g5q2x813c4wx.rcgu.o" "/OUT:E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.exe" "E:\\rustdir\\target\\debug\\deps\\test_iui-4ad7fb88b0403855.crate.allocator.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:E:\\rustdir\\target\\debug\\deps" "/LIBPATH:lib" "/LIBPATH:E:\\rustdir\\target\\debug\\build\\ui-sys-77c30c6ccbc7e5dd\\out\\build\\out\\Release" "/LIBPATH:C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "E:\\rustdir\\target\\debug\\deps\\libiui-83525d7d0cd950b9.rlib" "E:\\rustdir\\target\\debug\\deps\\libui_sys-23875eb73248004c.rlib" "E:\\rustdir\\target\\debug\\deps\\liblibc-57058dc78ce2c577.rlib" "E:\\rustdir\\target\\debug\\deps\\libfailure-3f5eb8c0ee68db22.rlib" "E:\\rustdir\\target\\debug\\deps\\libbacktrace-684c75ce68dd1ff0.rlib" "E:\\rustdir\\target\\debug\\deps\\librustc_demangle-ac4f8829c8cfdcfe.rlib" "E:\\rustdir\\target\\debug\\deps\\libcfg_if-4116deac892d1f09.rlib" "E:\\rustdir\\target\\debug\\deps\\libwinapi-ecc4ed9dab5add64.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libstd-4f6c832f116b0abe.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libpanic_unwind-b911946e8a3c0663.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libunwind-55102718cc9aa5fb.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-5bb804a2c7e07586.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc_system-047fc96b04eda8b5.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc-b35a2fad658422a1.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcore-cc1407f912443135.rlib" "C:\\Users\\zoumi\\.rustup\\toolchains\\nightly-2018-06-01-i686-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcompiler_builtins-2ad27d32139e019d.rlib" "libui.lib" "advapi32.lib" "dbghelp.lib" "kernel32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  = note:    Creating library E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.lib and object E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.exp
          LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(alloc.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(utf16.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(draw.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(control.cpp.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__SendMessageW@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(control.cpp.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(separator.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(label.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function _uiWindowSetContentSize
          libui.lib(winpublic.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetWindowPlacement@8 referenced in function _uiWindowSetFullscreen
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPlacement@8 referenced in function _uiWindowSetFullscreen
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(entry.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(multilineentry.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(combobox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(checkbox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(separator.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(label.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(spinbox.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(slider.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(group.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp__EnableWindow@8
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(button.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__SetMenu@8 referenced in function _uiNewWindow
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function "void __cdecl uiWindowShow(struct uiControl *)" (?uiWindowShow@@YAXPAUuiControl@@@Z)
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx@16 referenced in function "void __cdecl setClientSize(struct uiWindow *,int,int,int,unsigned long,unsigned long)" (?setClientSize@@YAXPAUuiWindow@@HHHKK@Z)
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__AdjustWindowRectEx@16
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongW@8
          libui.lib(tabpage.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(area.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(winpublic.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(winutil.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(container.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongW@12
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__MonitorFromWindow@8 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(window.obj) : error LNK2019: unresolved external symbol __imp__GetMonitorInfoW@8 referenced in function "void __cdecl windowMonitorRect(struct HWND__ *,struct tagRECT *)" (?windowMonitorRect@@YAXPAUHWND__@@PAUtagRECT@@@Z)
          libui.lib(grid.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(alloc.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(utf16.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(events.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(window.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(box.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(draw.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(tab.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _SetWindowSubclass@16 referenced in function _uiNewGroup
          libui.lib(d2dscratch.obj) : error LNK2001: unresolved external symbol _SetWindowSubclass@16
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _RemoveWindowSubclass@12 referenced in function "long __stdcall groupSubProc(struct HWND__ *,unsigned int,unsigned int,long,unsigned int,unsigned long)" (?groupSubProc@@YGJPAUHWND__@@IIJIK@Z)
          libui.lib(group.obj) : error LNK2019: unresolved external symbol _DefSubclassProc@16 referenced in function "long __stdcall groupSubProc(struct HWND__ *,unsigned int,unsigned int,long,unsigned int,unsigned long)" (?groupSubProc@@YGJPAUHWND__@@IIJIK@Z)
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps@8 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "struct ID2D1HwndRenderTarget * __cdecl makeHWNDRenderTarget(struct HWND__ *)" (?makeHWNDRenderTarget@@YAPAUID2D1HwndRenderTarget@@PAUHWND__@@@Z)
          libui.lib(text.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
          libui.lib(draw.obj) : error LNK2019: unresolved external symbol _D2D1CreateFactory@16 referenced in function "long __cdecl initDraw(void)" (?initDraw@@YAJXZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__CreateMenu@0 referenced in function "struct HMENU__ * __cdecl makeMenubar(void)" (?makeMenubar@@YAPAUHMENU__@@XZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__CreatePopupMenu@0 referenced in function "struct HMENU__ * __cdecl makeMenu(struct uiMenu *)" (?makeMenu@@YAPAUHMENU__@@PAUuiMenu@@@Z)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__AppendMenuW@16 referenced in function "struct HMENU__ * __cdecl makeMenubar(void)" (?makeMenubar@@YAPAUHMENU__@@XZ)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__GetMenuItemInfoW@16 referenced in function "void __cdecl freeMenubar(struct HMENU__ *)" (?freeMenubar@@YAXPAUHMENU__@@@Z)
          libui.lib(menu.obj) : error LNK2019: unresolved external symbol __imp__SetMenuItemInfoW@16 referenced in function "void __cdecl sync(struct uiMenuItem *)" (?sync@@YAXPAUuiMenuItem@@@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "char * __cdecl commonItemDialog(struct HWND__ *,struct _GUID const &,struct _GUID const &,unsigned long)" (?commonItemDialog@@YAPADPAUHWND__@@ABU_GUID@@1K@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__CoTaskMemFree@4 referenced in function "char * __cdecl commonItemDialog(struct HWND__ *,struct _GUID const &,struct _GUID const &,unsigned long)" (?commonItemDialog@@YAPADPAUHWND__@@ABU_GUID@@1K@Z)
          libui.lib(stddialogs.obj) : error LNK2019: unresolved external symbol __imp__TaskDialog@32 referenced in function "void __cdecl msgbox(struct HWND__ *,char const *,char const *,int,wchar_t const *)" (?msgbox@@YAXPAUHWND__@@PBD1HPB_W@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1MakeRotateMatrix@16 referenced in function "public: static class D2D1::Matrix3x2F __cdecl D2D1::Matrix3x2F::Rotation(float,struct D2D_POINT_2F)" (?Rotation@Matrix3x2F@D2D1@@SA?AV12@MUD2D_POINT_2F@@@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1MakeSkewMatrix@20 referenced in function "public: static class D2D1::Matrix3x2F __cdecl D2D1::Matrix3x2F::Skew(float,float,struct D2D_POINT_2F)" (?Skew@Matrix3x2F@D2D1@@SA?AV12@MMUD2D_POINT_2F@@@Z)
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1IsMatrixInvertible@4 referenced in function _uiDrawMatrixInvertible
          libui.lib(drawmatrix.obj) : error LNK2019: unresolved external symbol _D2D1InvertMatrix@4 referenced in function _uiDrawMatrixInvert
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CreateFontIndirectW@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _uiUninit
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__DeleteObject@4
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__LoadIconW@8 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__SystemParametersInfoW@16 referenced in function _uiInit
          libui.lib(areascroll.obj) : error LNK2001: unresolved external symbol __imp__SystemParametersInfoW@16
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function _uiUninit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function _uiInit
          libui.lib(init.obj) : error LNK2019: unresolved external symbol __imp__InitCommonControlsEx@4 referenced in function _uiInit
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__GetMessageW@16 referenced in function "int __cdecl waitMessage(struct tagMSG *)" (?waitMessage@@YAHPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function "int __cdecl peekMessage(struct tagMSG *)" (?peekMessage@@YAHPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PostMessageW@16 referenced in function _uiQueueMain
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function _uiQuit
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__GetActiveWindow@0 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__SetTimer@16 referenced in function _uiTimer
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__SetWindowsHookExW@16 referenced in function "int __cdecl registerMessageFilter(void)" (?registerMessageFilter@@YAHXZ)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__UnhookWindowsHookEx@4 referenced in function "void __cdecl unregisterMessageFilter(void)" (?unregisterMessageFilter@@YAXXZ)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long __stdcall filterProc(int,unsigned int,long)" (?filterProc@@YGJHIJ@Z)
          libui.lib(main.obj) : error LNK2019: unresolved external symbol __imp__IsDialogMessageW@8 referenced in function "void __cdecl processMessage(struct tagMSG *)" (?processMessage@@YAXPAUtagMSG@@@Z)
          libui.lib(entry.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTheme@12 referenced in function _uiNewSearchEntry
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function _uiWindowsEnsureDestroyWindow
          libui.lib(utilwin.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function _uiWindowsEnsureGetClientRect
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function _uiWindowsEnsureGetWindowRect
          libui.lib(winpublic.obj) : error LNK2019: unresolved external symbol __imp__SetParent@8 referenced in function _uiWindowsEnsureSetParentHWND
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__GetTextExtentPoint32W@16 referenced in function _uiWindowsWindowTextWidth
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__GetTextExtentPoint32W@16
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__SelectObject@8 referenced in function _uiWindowsWindowTextWidth
          libui.lib(sizing.obj) : error LNK2001: unresolved external symbol __imp__SelectObject@8
          libui.lib(parent.obj) : error LNK2001: unresolved external symbol __imp__SelectObject@8
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function "void __cdecl setWindowText(struct HWND__ *,wchar_t *)" (?setWindowText@@YAXPAUHWND__@@PA_W@Z)
          libui.lib(text.obj) : error LNK2019: unresolved external symbol __imp__GetWindowTextW@12 referenced in function "wchar_t * __cdecl windowTextAndLen(struct HWND__ *,long *)" (?windowTextAndLen@@YAPA_WPAUHWND__@@PAJ@Z)
          libui.lib(sizing.obj) : error LNK2019: unresolved external symbol __imp__GetTextMetricsW@8 referenced in function "void __cdecl getSizing(struct HWND__ *,struct uiWindowsSizing *,struct HFONT__ *)" (?getSizing@@YAXPAUHWND__@@PAUuiWindowsSizing@@PAUHFONT__@@@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetDlgItem@8 referenced in function "struct HWND__ * __cdecl getDlgItem(struct HWND__ *,int)" (?getDlgItem@@YAPAUHWND__@@PAU1@H@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__InvalidateRect@12 referenced in function "void __cdecl invalidateRect(struct HWND__ *,struct tagRECT *,int)" (?invalidateRect@@YAXPAUHWND__@@PAUtagRECT@@H@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__MapWindowPoints@16 referenced in function "void __cdecl mapWindowRect(struct HWND__ *,struct HWND__ *,struct tagRECT *)" (?mapWindowRect@@YAXPAUHWND__@@0PAUtagRECT@@@Z)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetClassNameW@12 referenced in function "int __cdecl windowClassOf(struct HWND__ *,...)" (?windowClassOf@@YAHPAUHWND__@@ZZ)
          libui.lib(winutil.obj) : error LNK2019: unresolved external symbol __imp__GetAncestor@8 referenced in function "struct HWND__ * __cdecl parentOf(struct HWND__ *)" (?parentOf@@YAPAUHWND__@@PAU1@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__BitBlt@36 referenced in function "void __cdecl paintContainerBackground(struct HWND__ *,struct HDC__ *,struct tagRECT *)" (?paintContainerBackground@@YAXPAUHWND__@@PAUHDC__@@PAUtagRECT@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleBitmap@12 referenced in function "long __cdecl parentDraw(struct HDC__ *,struct HWND__ *,struct parentDraw *)" (?parentDraw@@YAJPAUHDC__@@PAUHWND__@@PAU0@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreateCompatibleDC@4 referenced in function "long __cdecl parentDraw(struct HDC__ *,struct HWND__ *,struct parentDraw *)" (?parentDraw@@YAJPAUHDC__@@PAUHWND__@@PAU0@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__CreatePatternBrush@4 referenced in function "struct HBRUSH__ * __cdecl getControlBackgroundBrush(struct HWND__ *,struct HDC__ *)" (?getControlBackgroundBrush@@YAPAUHBRUSH__@@PAUHWND__@@PAUHDC__@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__DeleteDC@4 referenced in function "void __cdecl endParentDraw(struct parentDraw *)" (?endParentDraw@@YAXPAUparentDraw@@@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__SetBkMode@8 referenced in function "int __cdecl handleParentMessages(struct HWND__ *,unsigned int,unsigned int,long,long *)" (?handleParentMessages@@YAHPAUHWND__@@IIJPAJ@Z)
          libui.lib(parent.obj) : error LNK2019: unresolved external symbol __imp__SetBrushOrgEx@16 referenced in function "struct HBRUSH__ * __cdecl getControlBackgroundBrush(struct HWND__ *,struct HDC__ *)" (?getControlBackgroundBrush@@YAPAUHBRUSH__@@PAUHWND__@@PAUHDC__@@@Z)
          libui.lib(container.obj) : error LNK2019: unresolved external symbol __imp__BeginPaint@8 referenced in function "long __stdcall containerWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?containerWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(container.obj) : error LNK2019: unresolved external symbol __imp__EndPaint@8 referenced in function "long __stdcall containerWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?containerWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(events.obj) : error LNK2019: unresolved external symbol __imp__IsChild@8 referenced in function "int __cdecl shouldRun<int (__cdecl*)(struct uiControl *,struct HWND__ *,unsigned short,long *)>(struct HWND__ *,int (__cdecl*)(struct uiControl *,struct HWND__ *,unsigned short,long *))" (??$shouldRun@P6AHPAUuiControl@@PAUHWND__@@GPAJ@Z@@YAHPAUHWND__@@P6AHPAUuiControl@@0GPAJ@Z@Z)
          libui.lib(tabpage.obj) : error LNK2019: unresolved external symbol __imp__CreateDialogIndirectParamW@20 referenced in function "struct tabPage * __cdecl newTabPage(struct uiControl *)" (?newTabPage@@YAPAUtabPage@@PAUuiControl@@@Z)
          libui.lib(tabpage.obj) : error LNK2019: unresolved external symbol __imp__EnableThemeDialogTexture@8 referenced in function "struct tabPage * __cdecl newTabPage(struct uiControl *)" (?newTabPage@@YAPAUtabPage@@PAUuiControl@@@Z)
          libui.lib(utilwin.obj) : error LNK2019: unresolved external symbol __imp__KillTimer@8 referenced in function "long __stdcall utilWindowWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?utilWindowWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(d2dscratch.obj) : error LNK2019: unresolved external symbol __imp__ValidateRect@8 referenced in function "long __stdcall d2dScratchWndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?d2dScratchWndProc@@YGJPAUHWND__@@IIJ@Z)
          libui.lib(areadraw.obj) : error LNK2001: unresolved external symbol __imp__ValidateRect@8
          libui.lib(d2dscratch.obj) : error LNK2019: unresolved external symbol __imp__GetSysColor@4 referenced in function "long __cdecl d2dScratchDoPaint(struct HWND__ *,struct ID2D1RenderTarget *)" (?d2dScratchDoPaint@@YAJPAUHWND__@@PAUID2D1RenderTarget@@@Z)
          libui.lib(areadraw.obj) : error LNK2001: unresolved external symbol __imp__GetSysColor@4
          libui.lib(area.obj) : error LNK2019: unresolved external symbol __imp__ReleaseCapture@0 referenced in function _uiAreaBeginUserWindowMove
          libui.lib(areaevents.cpp.obj) : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
          libui.lib(dwrite.obj) : error LNK2019: unresolved external symbol __imp__DWriteCreateFactory@12 referenced in function "long __cdecl uiprivInitDrawText(void)" (?uiprivInitDrawText@@YAJXZ)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetMessageTime@0 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetDoubleClickTime@0 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetFocus@4 referenced in function "int __cdecl areaDoEvents(struct uiArea *,unsigned int,unsigned int,long,long *)" (?areaDoEvents@@YAHPAUuiArea@@IIJPAJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__GetKeyState@4 referenced in function "unsigned int __cdecl getModifiers(void)" (?getModifiers@@YAIXZ)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__SetCapture@4 referenced in function "void __cdecl capture(struct uiArea *,int)" (?capture@@YAXPAUuiArea@@H@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp__PtInRect@12 referenced in function "void __cdecl areaMouseEvent(struct uiArea *,int,int,unsigned int,long)" (?areaMouseEvent@@YAXPAUuiArea@@HHIJ@Z)
          libui.lib(areaevents.cpp.obj) : error LNK2019: unresolved external symbol __imp___TrackMouseEvent@4 referenced in function "void __cdecl track(struct uiArea *,int)" (?track@@YAXPAUuiArea@@H@Z)
          libui.lib(areadraw.obj) : error LNK2019: unresolved external symbol __imp__GetUpdateRect@12 referenced in function "void __cdecl onWM_PAINT(struct uiArea *)" (?onWM_PAINT@@YAXPAUuiArea@@@Z)
          libui.lib(areascroll.obj) : error LNK2019: unresolved external symbol __imp__SetScrollInfo@16 referenced in function "void __cdecl scrollto(struct uiArea *,int,struct scrollParams *,int)" (?scrollto@@YAXPAUuiArea@@HPAUscrollParams@@H@Z)
          libui.lib(areascroll.obj) : error LNK2019: unresolved external symbol __imp__GetScrollInfo@12 referenced in function "void __cdecl scroll(struct uiArea *,int,struct scrollParams *,unsigned int,long)" (?scroll@@YAXPAUuiArea@@HPAUscrollParams@@IJ@Z)
          E:\rustdir\target\debug\deps\test_iui-4ad7fb88b0403855.exe : fatal error LNK1120: 102 unresolved externals
zoumi commented 5 years ago

If I add these to build.rs, it will compile.But I get an error when I run the program: Can not locate index 344 in COMCTL32.dll

   println!("cargo:rustc-link-lib={}", "user32");
    println!("cargo:rustc-link-lib={}", "kernel32");
    println!("cargo:rustc-link-lib={}", "gdi32");
    println!("cargo:rustc-link-lib={}", "comctl32");
    println!("cargo:rustc-link-lib={}", "uxtheme");
    println!("cargo:rustc-link-lib={}", "msimg32");
    println!("cargo:rustc-link-lib={}", "comdlg32");
    println!("cargo:rustc-link-lib={}", "d2d1");
    println!("cargo:rustc-link-lib={}", "dwrite");
    println!("cargo:rustc-link-lib={}", "ole32");
    println!("cargo:rustc-link-lib={}", "oleaut32");
    println!("cargo:rustc-link-lib={}", "oleacc");
    println!("cargo:rustc-link-lib={}", "uuid");
    println!("cargo:rustc-link-lib={}", "windowscodecs");