andlabs / libui

Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
Other
10.74k stars 616 forks source link

How to use the static library? #337

Open lewisxy opened 6 years ago

lewisxy commented 6 years ago

I know this question may be dumb, but I just can't figure out how to do it.

I successfully compiled the program with CMake 3.11 on Windows 7 x86 with mingw32 gcc 7.2.0 and it gives two files: one libui.a and another libui.res. I want to test this library so I build the examples with mingw32-make -f Makefile examples using the Makefile generated by CMake, and it works as well.

But I wonder how I can use this library in my own project without CMake since I am not an expert on CMake and I don't want to mess up with it. So I copy the main.c inside the examples\histogram as well as ui.h and the two library files listed above to another location and run the following command in the folder containing main.c

gcc main.c -Iinclude -Llib -lui -o main.exe

I am expecting this to work since main.c only includes ui.h besides standard library and ui.h does not include other external headers as well. but it does work and throws me a bunch of undefined references. The stderr is attached:

C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `Z11uninitAllocv':
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:16: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:23: undefined reference to `std::ostream::operator<<(void const*)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:25: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:25: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:16: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `uiAlloc':
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:34: undefined reference to `operator new(unsigned int)'
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:34: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `uiFree':
C:/Users/111111/Desktop/alpha3.5/src/windows/alloc.cpp:61: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS5_EESJ_IJEEEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOS0_EESI_IJEEEEESt17_Rb_tree_iteratorIS7_ESt23_Rb_tree_const_iteratorIS7_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS2_EESI_IJEEEEESt17_Rb_tree_iteratorIS7_ESt23_Rb_tree_const_iteratorIS7_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEjRKh':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:527: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:537: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:527: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSF_PSt13_Rb_tree_nodeIS7_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNKSt6vectorIhSaIhEE12_M_check_lenEjPKc':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS5_EESJ_IJEEEEEvPSt13_Rb_tree_nodeIS8_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOS0_EESI_IJEEEEEvPSt13_Rb_tree_nodeIS7_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS2_EESI_IJEEEEEvPSt13_Rb_tree_nodeIS7_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEppEi':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS7_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEppEi':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS8_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorIhE10deallocateEPhj':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorIhE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE10deallocateEPSA_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPSt6vectorIhSaIhEEPKcEEE10deallocateEPSB_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPSt6vectorIhSaIhEEPKcEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1EjRKhRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZSt16forward_as_tupleIJPhEESt5tupleIJDpOT_EES4_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEED1Ev+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(areaevents.cpp.obj): In function `track':
C:/Users/111111/Desktop/alpha3.5/src/windows/areaevents.cpp:54: undefined reference to `_imp___TrackMouseEvent@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `uiBoxDestroy':
C:/Users/111111/Desktop/alpha3.5/src/windows/box.cpp:131: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `finishNewBox':
C:/Users/111111/Desktop/alpha3.5/src/windows/box.cpp:307: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `ZNSt6vectorI8boxChildSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:436: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:444: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:436: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `ZNKSt6vectorI8boxChildSaIS0_EE12_M_check_lenEjPKc':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI8boxChildE10deallocateEPS1_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI8boxChildE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EEC1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt12_Vector_baseI8boxChildSaIS0_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `svChooserSubProc':
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:565: undefined reference to `RemoveWindowSubclass@12'
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:569: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZN4D2D110Matrix3x2F8RotationEf12D2D_POINT_2F':
D:/mingw32/i686-w64-mingw32/include/d2d1helper.h:402: undefined reference to `D2D1MakeRotateMatrix@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `hSliderSubProc':
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:709: undefined reference to `RemoveWindowSubclass@12'
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:713: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `previewSubProc':
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:762: undefined reference to `RemoveWindowSubclass@12'
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:766: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `opacitySliderSubProc':
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:851: undefined reference to `RemoveWindowSubclass@12'
C:/Users/111111/Desktop/alpha3.5/src/windows/colordialog.cpp:855: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEESt17_Rb_tree_iteratorIS6_ESt23_Rb_tree_const_iteratorIS6_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSE_PSt13_Rb_tree_nodeIS6_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE10_M_insert_IRKS6_NSC_11_Alloc_nodeEEESt17_Rb_tree_iteratorIS6_EPSt18_Rb_tree_node_baseSK_OT_RT0_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:1755: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEEvPSt13_Rb_tree_nodeIS6_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKiPFvP11colorDialogEEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKiPFvP11colorDialogEEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPFvP11colorDialogEEEE10deallocateEPS9_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPFvP11colorDialogEEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE17_M_construct_nodeIJRKS6_EEEvPSt13_Rb_tree_nodeIS6_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame+0x56f): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt3mapIiPFvP11colorDialogESt4lessIiESaISt4pairIKiS3_EEEC1ESt16initializer_listIS8_ERKS5_RKS9_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC1ERKSA_RKSB_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEESt17_Rb_tree_iteratorIS6_ESt23_Rb_tree_const_iteratorIS6_EDpOT_+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(d2dscratch.cpp.obj): In function `Z13newD2DScratchP6HWND__P7tagRECTP7HMENU__PU7stdcallFlS0_jjljmEm':
C:/Users/111111/Desktop/alpha3.5/src/windows/d2dscratch.cpp:163: undefined reference to `SetWindowSubclass@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `Z8initDrawv':
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:17: undefined reference to `D2D1CreateFactory@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `Z20makeHWNDRenderTargetP6HWND__':
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:44: undefined reference to `_imp__GetDeviceCaps@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:45: undefined reference to `_imp__GetDeviceCaps@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `Z19makeHDCRenderTargetP5HDC(tagRECT *)':
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:80: undefined reference to `_imp__GetDeviceCaps@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:81: undefined reference to `_imp__GetDeviceCaps@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `Z10newContextP17ID2D1RenderTarget':
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:112: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `Z11freeContextP13uiDrawContext':
C:/Users/111111/Desktop/alpha3.5/src/windows/draw.cpp:124: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `ZNSt6vectorI9drawStateSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:436: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:444: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/vector.tcc:436: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `ZNKSt6vectorI9drawStateSaIS0_EE12_M_check_lenEjPKc':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI9drawStateE10deallocateEPS1_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI9drawStateE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EEC1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EE8pop_backEv+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt12_Vector_baseI9drawStateSaIS0_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(drawmatrix.cpp.obj): In function `ZN4D2D110Matrix3x2F8RotationEf12D2D_POINT_2F':
D:/mingw32/i686-w64-mingw32/include/d2d1helper.h:402: undefined reference to `D2D1MakeRotateMatrix@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(drawmatrix.cpp.obj): In function `ZN4D2D110Matrix3x2F4SkewEff12D2D_POINT_2F':
D:/mingw32/i686-w64-mingw32/include/d2d1helper.h:408: undefined reference to `D2D1MakeSkewMatrix@20'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(drawmatrix.cpp.obj): In function `uiDrawMatrixInvertible':
C:/Users/111111/Desktop/alpha3.5/src/windows/drawmatrix.cpp:87: undefined reference to `D2D1IsMatrixInvertible@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(drawmatrix.cpp.obj): In function `uiDrawMatrixInvert':
C:/Users/111111/Desktop/alpha3.5/src/windows/drawmatrix.cpp:95: undefined reference to `D2D1InvertMatrix@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__bEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSD_PSt13_Rb_tree_nodeIS5_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEEvPSt13_Rb_tree_nodeIS5_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__7handlerEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__7handlerEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__bEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__7handlerEEE10deallocateEPS8_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__7handlerEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__bEEE10deallocateEPS7_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__bEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS5_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS5_E+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(init.cpp.obj): In function `uiInit':
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:93: undefined reference to `_imp__CreateFontIndirectW@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:100: undefined reference to `_imp__GetStockObject@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:107: undefined reference to `_imp__InitCommonControlsEx@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:110: undefined reference to `_imp__CoInitialize@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(init.cpp.obj): In function `uiUninit':
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:144: undefined reference to `_imp__CoUninitialize@0'
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:145: undefined reference to `_imp__DeleteObject@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/init.cpp:148: undefined reference to `_imp__DeleteObject@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(parent.cpp.obj): In function `parentDraw':
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:37: undefined reference to `_imp__CreateCompatibleDC@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:40: undefined reference to `_imp__CreateCompatibleBitmap@12'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:43: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(parent.cpp.obj): In function `endParentDraw':
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:54: undefined reference to `_imp__SelectObject@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:57: undefined reference to `_imp__DeleteObject@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:60: undefined reference to `_imp__DeleteDC@4'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(parent.cpp.obj): In function `getControlBackgroundBrush':
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:78: undefined reference to `_imp__CreatePatternBrush@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:91: undefined reference to `_imp__SetBrushOrgEx@16'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(parent.cpp.obj): In function `Z24paintContainerBackgroundP6HWND(HDC__ *, tagRECT *)':
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:111: undefined reference to `_imp__BitBlt@36'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(parent.cpp.obj): In function `Z20handleParentMessagesP6HWND__jjlPl':
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:133: undefined reference to `_imp__DeleteObject@4'
C:/Users/111111/Desktop/alpha3.5/src/windows/parent.cpp:135: undefined reference to `_imp__SetBkMode@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(sizing.cpp.obj): In function `Z9getSizingP6HWND(uiWindowsSizing *, HFONT__ *)':
C:/Users/111111/Desktop/alpha3.5/src/windows/sizing.cpp:15: undefined reference to `_imp__SelectObject@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/sizing.cpp:20: undefined reference to `_imp__GetTextMetricsW@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/sizing.cpp:22: undefined reference to `_imp__GetTextExtentPoint32W@16'
C:/Users/111111/Desktop/alpha3.5/src/windows/sizing.cpp:29: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(text.cpp.obj): In function `uiWindowsWindowTextWidth':
C:/Users/111111/Desktop/alpha3.5/src/windows/text.cpp:63: undefined reference to `_imp__SelectObject@8'
C:/Users/111111/Desktop/alpha3.5/src/windows/text.cpp:69: undefined reference to `_imp__GetTextExtentPoint32W@16'
C:/Users/111111/Desktop/alpha3.5/src/windows/text.cpp:76: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(utf16.cpp.obj): In function `Z8ftoutf16d':
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream(std::_Ios_Openmode)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:139: undefined reference to `std::basic_ostream<wchar_t, std::char_traits<wchar_t> >::operator<<(double)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator=(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:141: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::c_str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(utf16.cpp.obj): In function `Z8itoutf16i':
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream(std::_Ios_Openmode)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:150: undefined reference to `std::basic_ostream<wchar_t, std::char_traits<wchar_t> >::operator<<(int)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator=(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:152: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::c_str() const'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
C:/Users/111111/Desktop/alpha3.5/src/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(utf16.cpp.obj):utf16.cpp:(.eh_frame+0x10b): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP8uiWindowbEEppEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKP8uiWindowbEEppEi':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS4_E':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP8uiWindowbEEmmEv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP8uiWindowbEEE10deallocateEPS7_j':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP8uiWindowbEEE8allocateEjPKv':
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
D:/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE5clearEv+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\src\examples\histogram\lib/libui.a(dwrite.cpp.obj): In function `Z12initDrawTextv':
C:/Users/111111/Desktop/alpha3.5/src/windows/dwrite.cpp:12: undefined reference to `_imp__DWriteCreateFactory@12'
collect2.exe: error: ld returned 1 exit status

Before I compile the library myself, I use the prebuild static library for mingw in the Alpha 3.5 release and tdm-gcc 5.1.0 to build main.c. The compiler throw me something similar:

C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `Z8initDrawv':
E:/github.com/andlabs/libui/windows/draw.cpp:17: undefined reference to `D2D1CreateFactory@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `Z20makeHWNDRenderTargetP6HWND__':
E:/github.com/andlabs/libui/windows/draw.cpp:44: undefined reference to `_imp__GetDeviceCaps@8'
E:/github.com/andlabs/libui/windows/draw.cpp:45: undefined reference to `_imp__GetDeviceCaps@8'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `Z19makeHDCRenderTargetP5HDC(tagRECT *)':
E:/github.com/andlabs/libui/windows/draw.cpp:80: undefined reference to `_imp__GetDeviceCaps@8'
E:/github.com/andlabs/libui/windows/draw.cpp:81: undefined reference to `_imp__GetDeviceCaps@8'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `Z10newContextP17ID2D1RenderTarget':
E:/github.com/andlabs/libui/windows/draw.cpp:112: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `Z11freeContextP13uiDrawContext':
E:/github.com/andlabs/libui/windows/draw.cpp:124: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `ZNSt6vectorI9drawStateSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:444: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `ZNKSt6vectorI9drawStateSaIS0_EE12_M_check_lenEjPKc':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI9drawStateE10deallocateEPS1_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI9drawStateE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EEC1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EE8pop_backEv+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt12_Vector_baseI9drawStateSaIS0_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(draw.cpp.obj):draw.cpp:(.eh_frame$_ZNSt6vectorI9drawStateSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(drawmatrix.cpp.obj): In function `ZN4D2D110Matrix3x2F8RotationEf12D2D_POINT_2F':
C:/msys64/mingw32/i686-w64-mingw32/include/d2d1helper.h:402: undefined reference to `D2D1MakeRotateMatrix@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(drawmatrix.cpp.obj): In function `ZN4D2D110Matrix3x2F4SkewEff12D2D_POINT_2F':
C:/msys64/mingw32/i686-w64-mingw32/include/d2d1helper.h:408: undefined reference to `D2D1MakeSkewMatrix@20'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(drawmatrix.cpp.obj): In function `uiDrawMatrixInvertible':
E:/github.com/andlabs/libui/windows/drawmatrix.cpp:87: undefined reference to `D2D1IsMatrixInvertible@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(drawmatrix.cpp.obj): In function `uiDrawMatrixInvert':
E:/github.com/andlabs/libui/windows/drawmatrix.cpp:95: undefined reference to `D2D1InvertMatrix@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(init.cpp.obj): In function `uiInit':
E:/github.com/andlabs/libui/windows/init.cpp:93: undefined reference to `_imp__CreateFontIndirectW@4'
E:/github.com/andlabs/libui/windows/init.cpp:100: undefined reference to `_imp__GetStockObject@4'
E:/github.com/andlabs/libui/windows/init.cpp:107: undefined reference to `_imp__InitCommonControlsEx@4'
E:/github.com/andlabs/libui/windows/init.cpp:110: undefined reference to `_imp__CoInitialize@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(init.cpp.obj): In function `uiUninit':
E:/github.com/andlabs/libui/windows/init.cpp:144: undefined reference to `_imp__CoUninitialize@0'
E:/github.com/andlabs/libui/windows/init.cpp:145: undefined reference to `_imp__DeleteObject@4'
E:/github.com/andlabs/libui/windows/init.cpp:148: undefined reference to `_imp__DeleteObject@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP8uiWindowbEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKP8uiWindowbEEppEi':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS4_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP8uiWindowbEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP8uiWindowbEEE10deallocateEPS7_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP8uiWindowbEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP8uiWindowbEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJRS5_EESD_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE5clearEv+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(window.cpp.obj):window.cpp:(.eh_frame$_ZNSt8_Rb_treeIP8uiWindowSt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `uiBoxDestroy':
E:/github.com/andlabs/libui/windows/box.cpp:131: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `finishNewBox':
E:/github.com/andlabs/libui/windows/box.cpp:307: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `ZNSt6vectorI8boxChildSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:444: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:436: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `ZNKSt6vectorI8boxChildSaIS0_EE12_M_check_lenEjPKc':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI8boxChildE10deallocateEPS1_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorI8boxChildE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EEC1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt12_Vector_baseI8boxChildSaIS0_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(box.cpp.obj):box.cpp:(.eh_frame$_ZNSt6vectorI8boxChildSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(text.cpp.obj): In function `uiWindowsWindowTextWidth':
E:/github.com/andlabs/libui/windows/text.cpp:63: undefined reference to `_imp__SelectObject@8'
E:/github.com/andlabs/libui/windows/text.cpp:69: undefined reference to `_imp__GetTextExtentPoint32W@16'
E:/github.com/andlabs/libui/windows/text.cpp:76: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `Z11uninitAllocv':
E:/github.com/andlabs/libui/windows/alloc.cpp:16: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
E:/github.com/andlabs/libui/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
E:/github.com/andlabs/libui/windows/alloc.cpp:23: undefined reference to `std::ostream::operator<<(void const*)'
E:/github.com/andlabs/libui/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
E:/github.com/andlabs/libui/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
E:/github.com/andlabs/libui/windows/alloc.cpp:23: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
E:/github.com/andlabs/libui/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const'
E:/github.com/andlabs/libui/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)'
E:/github.com/andlabs/libui/windows/alloc.cpp:24: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/github.com/andlabs/libui/windows/alloc.cpp:25: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const'
E:/github.com/andlabs/libui/windows/alloc.cpp:25: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/github.com/andlabs/libui/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/alloc.cpp:17: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/github.com/andlabs/libui/windows/alloc.cpp:16: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/alloc.cpp:16: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `uiAlloc':
E:/github.com/andlabs/libui/windows/alloc.cpp:34: undefined reference to `operator new(unsigned int)'
E:/github.com/andlabs/libui/windows/alloc.cpp:34: undefined reference to `operator delete(void*)'
E:/github.com/andlabs/libui/windows/alloc.cpp:34: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `uiFree':
E:/github.com/andlabs/libui/windows/alloc.cpp:61: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt6vectorIhSaIhEEC1EjRKhRKS0_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_vector.h:297: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS5_EESJ_IJEEEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt12_Vector_baseIhSaIhEEC2EjRKS0_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_vector.h:137: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOS0_EESI_IJEEEEESt17_Rb_tree_iteratorIS7_ESt23_Rb_tree_const_iteratorIS7_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS2_EESI_IJEEEEESt17_Rb_tree_iteratorIS7_ESt23_Rb_tree_const_iteratorIS7_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EEjRKh':
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:469: undefined reference to `_Unwind_Resume'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:527: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:537: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:527: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/vector.tcc:527: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSF_PSt13_Rb_tree_nodeIS7_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNKSt6vectorIhSaIhEE12_M_check_lenEjPKc':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_vector.h:1500: undefined reference to `std::__throw_length_error(char const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS5_EESJ_IJEEEEEvPSt13_Rb_tree_nodeIS8_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOS0_EESI_IJEEEEEvPSt13_Rb_tree_nodeIS7_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS2_EESI_IJEEEEEvPSt13_Rb_tree_nodeIS7_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKPhPSt6vectorIhSaIhEEEEppEi':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS7_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt23_Rb_tree_const_iteratorISt4pairIKPSt6vectorIhSaIhEEPKcEEppEi':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:374: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS8_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2473: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorIhE10deallocateEPhj':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorIhE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE10deallocateEPSA_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPSt6vectorIhSaIhEEPKcEEE10deallocateEPSB_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPSt6vectorIhSaIhEEPKcEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPSt6vectorIhSaIhEEPKcEEE9constructISA_JRKSt21piecewise_construct_tSt5tupleIJRS7_EESH_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE9constructIS9_JRKSt21piecewise_construct_tSt5tupleIJOS3_EESG_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKPhPSt6vectorIhSaIhEEEEE9constructIS9_JRKSt21piecewise_construct_tSt5tupleIJRS4_EESG_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt8_Rb_treeIPhSt4pairIKS0_PSt6vectorIhSaIhEEESt10_Select1stIS7_ESt4lessIS0_ESaIS7_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt8_Rb_treeIPSt6vectorIhSaIhEESt4pairIKS3_PKcESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEEC1EjRKhRKS0_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZSt16forward_as_tupleIJPhEESt5tupleIJDpOT_EES4_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(alloc.cpp.obj):alloc.cpp:(.eh_frame$_ZNSt6vectorIhSaIhEED1Ev+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__bEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSD_PSt13_Rb_tree_nodeIS5_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEEvPSt13_Rb_tree_nodeIS5_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__7handlerEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__7handlerEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKP6HWND__bEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__7handlerEEE10deallocateEPS8_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__7handlerEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__7handlerEEE9constructIS7_JRKSt21piecewise_construct_tSt5tupleIJRS5_EESE_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__bEEE10deallocateEPS7_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__bEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKP6HWND__bEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJRS5_EESD_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESG_IJEEEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS3_EESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS5_E+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(events.cpp.obj):events.cpp:(.eh_frame$_ZNSt8_Rb_treeIP6HWND__St4pairIKS1_7handlerESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS5_E+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(sizing.cpp.obj): In function `Z9getSizingP6HWND(uiWindowsSizing *, HFONT__ *)':
E:/github.com/andlabs/libui/windows/sizing.cpp:15: undefined reference to `_imp__SelectObject@8'
E:/github.com/andlabs/libui/windows/sizing.cpp:20: undefined reference to `_imp__GetTextMetricsW@8'
E:/github.com/andlabs/libui/windows/sizing.cpp:22: undefined reference to `_imp__GetTextExtentPoint32W@16'
E:/github.com/andlabs/libui/windows/sizing.cpp:29: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(debug.cpp.obj): In function `realbug':
E:/github.com/andlabs/libui/windows/debug.cpp:76: undefined reference to `_imp__vsprintf_s'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `svChooserSubProc':
E:/github.com/andlabs/libui/windows/colordialog.cpp:565: undefined reference to `RemoveWindowSubclass@12'
E:/github.com/andlabs/libui/windows/colordialog.cpp:569: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZN4D2D110Matrix3x2F8RotationEf12D2D_POINT_2F':
C:/msys64/mingw32/i686-w64-mingw32/include/d2d1helper.h:402: undefined reference to `D2D1MakeRotateMatrix@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `hSliderSubProc':
E:/github.com/andlabs/libui/windows/colordialog.cpp:709: undefined reference to `RemoveWindowSubclass@12'
E:/github.com/andlabs/libui/windows/colordialog.cpp:713: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `previewSubProc':
E:/github.com/andlabs/libui/windows/colordialog.cpp:762: undefined reference to `RemoveWindowSubclass@12'
E:/github.com/andlabs/libui/windows/colordialog.cpp:766: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `opacitySliderSubProc':
E:/github.com/andlabs/libui/windows/colordialog.cpp:851: undefined reference to `RemoveWindowSubclass@12'
E:/github.com/andlabs/libui/windows/colordialog.cpp:855: undefined reference to `DefSubclassProc@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `_static_initialization_and_destruction_0':
E:/github.com/andlabs/libui/windows/colordialog.cpp:1189: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt3mapIiPFvP11colorDialogESt4lessIiESaISt4pairIKiS3_EEEC1ESt16initializer_listIS8_ERKS5_RKS9_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_map.h:223: undefined reference to `_Unwind_Resume'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_map.h:223: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC1ERKSA_RKSB_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:918: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEESt17_Rb_tree_iteratorIS6_ESt23_Rb_tree_const_iteratorIS6_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2413: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2410: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSE_PSt13_Rb_tree_nodeIS6_E':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:2304: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE10_M_insert_IRKS6_NSC_11_Alloc_nodeEEESt17_Rb_tree_iteratorIS6_EPSt18_Rb_tree_node_baseSK_OT_RT0_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:1755: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEEvPSt13_Rb_tree_nodeIS6_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKiPFvP11colorDialogEEEmmEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:302: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt17_Rb_tree_iteratorISt4pairIKiPFvP11colorDialogEEEppEv':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:287: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPFvP11colorDialogEEEE10deallocateEPS9_j':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:125: undefined reference to `operator delete(void*)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPFvP11colorDialogEEEE8allocateEjPKv':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:111: undefined reference to `operator new(unsigned int)'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPFvP11colorDialogEEEE9constructIS8_JRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPT_DpOT0_':
C:/msys64/mingw32/include/c++/7.3.0/ext/new_allocator.h:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj): In function `ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE17_M_construct_nodeIJRKS6_EEEvPSt13_Rb_tree_nodeIS6_EDpOT_':
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_begin_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:634: undefined reference to `__cxa_rethrow'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `__cxa_end_catch'
C:/msys64/mingw32/include/c++/7.3.0/bits/stl_tree.h:630: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame+0x56f): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt3mapIiPFvP11colorDialogESt4lessIiESaISt4pairIKiS3_EEEC1ESt16initializer_listIS8_ERKS5_RKS9_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EEC1ERKSA_RKSB_+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(colordialog.cpp.obj):colordialog.cpp:(.eh_frame$_ZNSt8_Rb_treeIiSt4pairIKiPFvP11colorDialogEESt10_Select1stIS6_ESt4lessIiESaIS6_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESH_IJEEEEESt17_Rb_tree_iteratorIS6_ESt23_Rb_tree_const_iteratorIS6_EDpOT_+0x13): more undefined references to `__gxx_personality_v0' follow
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(areaevents.cpp.obj): In function `track':
E:/github.com/andlabs/libui/windows/areaevents.cpp:54: undefined reference to `_imp___TrackMouseEvent@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(utf16.cpp.obj): In function `Z8utf16dupPKw':
E:/github.com/andlabs/libui/windows/utf16.cpp:59: undefined reference to `_imp__wcscpy_s'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(utf16.cpp.obj): In function `Z5vstrfPKwPc':
E:/github.com/andlabs/libui/windows/utf16.cpp:90: undefined reference to `vswprintf_s'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(utf16.cpp.obj): In function `Z8ftoutf16d':
E:/github.com/andlabs/libui/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream(std::_Ios_Openmode)'
E:/github.com/andlabs/libui/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:139: undefined reference to `std::basic_ostream<wchar_t, std::char_traits<wchar_t> >::operator<<(double)'
E:/github.com/andlabs/libui/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::str() const'
E:/github.com/andlabs/libui/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator=(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)'
E:/github.com/andlabs/libui/windows/utf16.cpp:140: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:141: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::c_str() const'
E:/github.com/andlabs/libui/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/utf16.cpp:137: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:136: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/utf16.cpp:136: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(utf16.cpp.obj): In function `Z8itoutf16i':
E:/github.com/andlabs/libui/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream(std::_Ios_Openmode)'
E:/github.com/andlabs/libui/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:150: undefined reference to `std::basic_ostream<wchar_t, std::char_traits<wchar_t> >::operator<<(int)'
E:/github.com/andlabs/libui/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::str() const'
E:/github.com/andlabs/libui/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator=(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)'
E:/github.com/andlabs/libui/windows/utf16.cpp:151: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:152: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::c_str() const'
E:/github.com/andlabs/libui/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/utf16.cpp:148: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
E:/github.com/andlabs/libui/windows/utf16.cpp:147: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_ostringstream()'
E:/github.com/andlabs/libui/windows/utf16.cpp:147: undefined reference to `_Unwind_Resume'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(utf16.cpp.obj):utf16.cpp:(.eh_frame+0x10b): undefined reference to `__gxx_personality_v0'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(dwrite.cpp.obj): In function `Z12initDrawTextv':
E:/github.com/andlabs/libui/windows/dwrite.cpp:12: undefined reference to `_imp__DWriteCreateFactory@12'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(d2dscratch.cpp.obj): In function `Z13newD2DScratchP6HWND__P7tagRECTP7HMENU__PU7stdcallFlS0_jjljmEm':
E:/github.com/andlabs/libui/windows/d2dscratch.cpp:163: undefined reference to `SetWindowSubclass@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(parent.cpp.obj): In function `parentDraw':
E:/github.com/andlabs/libui/windows/parent.cpp:37: undefined reference to `_imp__CreateCompatibleDC@4'
E:/github.com/andlabs/libui/windows/parent.cpp:40: undefined reference to `_imp__CreateCompatibleBitmap@12'
E:/github.com/andlabs/libui/windows/parent.cpp:43: undefined reference to `_imp__SelectObject@8'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(parent.cpp.obj): In function `endParentDraw':
E:/github.com/andlabs/libui/windows/parent.cpp:54: undefined reference to `_imp__SelectObject@8'
E:/github.com/andlabs/libui/windows/parent.cpp:57: undefined reference to `_imp__DeleteObject@4'
E:/github.com/andlabs/libui/windows/parent.cpp:60: undefined reference to `_imp__DeleteDC@4'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(parent.cpp.obj): In function `getControlBackgroundBrush':
E:/github.com/andlabs/libui/windows/parent.cpp:78: undefined reference to `_imp__CreatePatternBrush@4'
E:/github.com/andlabs/libui/windows/parent.cpp:91: undefined reference to `_imp__SetBrushOrgEx@16'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(parent.cpp.obj): In function `Z24paintContainerBackgroundP6HWND(HDC__ *, tagRECT *)':
E:/github.com/andlabs/libui/windows/parent.cpp:111: undefined reference to `_imp__BitBlt@36'
C:\Users\111111\Desktop\alpha3.5\windows_386\mingw_static/libui.a(parent.cpp.obj): In function `Z20handleParentMessagesP6HWND__jjlPl':
E:/github.com/andlabs/libui/windows/parent.cpp:133: undefined reference to `_imp__DeleteObject@4'
E:/github.com/andlabs/libui/windows/parent.cpp:135: undefined reference to `_imp__SetBkMode@8'
collect2.exe: error: ld returned 1 exit status

And now I am frustrated of what I should do. I really love this project since this seemed to be the only lightweight crossplatform GUI library for C on the Internet. So it is highly appreciated if any one can help.

andlabs commented 6 years ago

You'll need to link both the .a and .res files in.

You'll need to use these link options:

-luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc

(At present, the order is important. If I find I don't need usp10 in the future, then this will stop being true.) You may also need to link with g++ instead of gcc, but I'm not quite sure how this works.

For package ui, I also use -static -static-libgcc -static-libstdc++. I do not know what consequences these will have for your build.

Finally, I want to clean up this whole mess, because it is a mess — see #308 and andlabs/ui#281.

lewisxy commented 6 years ago

@andlabs Thanks for your quick reply I managed to build main.exe with the following command without getting compiler errors

g++ main.c -Iinclude -Llib -lui -l:libui.res -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -o main.exe

However, the binary does not work. When I run it through the double-click, it flashes a cmd window and closed. When I run it with the command line, it gives the following runtime error:

error initializing ui: error initializing libui: initializing Common Controls; code 0 (0x00000000) 鎿嶄綔鎴愬姛瀹屾垚銆?

Since I am not as nearly familiar with c++ (or g++) as I am for c, I have a hard time debugging these errors. Can you help me with it? Also, I don't quite understand what do you mean by mentioning -static -static-libgcc -static-libstdc++, do I need to pass these flags somewhere? Thanks

andlabs commented 6 years ago

I don't understand that error message. What is 鎿嶄綔鎴愬姛瀹屾垚銆? Neither Google nor Google Translate is giving me much insight. Furthermore, if InitCommonControlsEx() is failing with last error 0, then something is seriously wrong...

(That weird string did expose another random bug in libui when I used it in a test run; thanks. If uiFreeText() crashes for you, a fix is forthcoming.)

lewisxy commented 6 years ago

I tried to rebuild the library with the same configuration of the latest source (which is currently 465 commits ahead of the Alpha 3.5 release) and the build was failed on Windows.

C:\Users\111111\Desktop\libui-master\build>mingw32-make -f Makefile -j4 2> log.txt
[  1%] Building C object CMakeFiles/libui.dir/common/attrlist.c.obj
[  2%] Building C object CMakeFiles/libui.dir/common/attribute.c.obj
[  4%] Building C object CMakeFiles/libui.dir/common/areaevents.c.obj
[  5%] Building C object CMakeFiles/libui.dir/common/attrstr.c.obj
[  7%] Building C object CMakeFiles/libui.dir/common/control.c.obj
[  8%] Building C object CMakeFiles/libui.dir/common/debug.c.obj
[ 10%] Building C object CMakeFiles/libui.dir/common/matrix.c.obj
[ 11%] Building C object CMakeFiles/libui.dir/common/opentype.c.obj
[ 13%] Building C object CMakeFiles/libui.dir/common/shouldquit.c.obj
[ 14%] Building C object CMakeFiles/libui.dir/common/userbugs.c.obj
[ 16%] Building C object CMakeFiles/libui.dir/common/utf.c.obj
[ 17%] Building CXX object CMakeFiles/libui.dir/windows/alloc.cpp.obj
[ 19%] Building CXX object CMakeFiles/libui.dir/windows/areadraw.cpp.obj
[ 20%] Building CXX object CMakeFiles/libui.dir/windows/area.cpp.obj
[ 22%] Building CXX object CMakeFiles/libui.dir/windows/areaevents.cpp.obj
[ 23%] Building CXX object CMakeFiles/libui.dir/windows/areascroll.cpp.obj
[ 25%] Building CXX object CMakeFiles/libui.dir/windows/areautil.cpp.obj
[ 26%] Building CXX object CMakeFiles/libui.dir/windows/attrstr.cpp.obj
[ 27%] Building CXX object CMakeFiles/libui.dir/windows/box.cpp.obj
[ 29%] Building CXX object CMakeFiles/libui.dir/windows/button.cpp.obj
[ 30%] Building CXX object CMakeFiles/libui.dir/windows/checkbox.cpp.obj

C:\Users\111111\Desktop\libui-master\build>

I record the errors into a log file that shows some weird errors seem to be in attrstr.cpp in windows folder.

C:\Users\111111\Desktop\libui-master\common\attrlist.c: In function 'uiprivAttrListRemoveAttribute':
C:\Users\111111\Desktop\libui-master\common\attrlist.c:505:15: warning: variable 'tailsAt' set but not used [-Wunused-but-set-variable]
  struct attr *tailsAt = NULL;
               ^~~~~~~
C:\Users\111111\Desktop\libui-master\common\attrlist.c: In function 'uiprivAttrListRemoveAttributes':
C:\Users\111111\Desktop\libui-master\common\attrlist.c:552:15: warning: variable 'tailsAt' set but not used [-Wunused-but-set-variable]
  struct attr *tailsAt = NULL;
               ^~~~~~~
C:\Users\111111\Desktop\libui-master\common\attribute.c: In function 'uiprivAttributeRelease':
C:\Users\111111\Desktop\libui-master\common\attribute.c:65:76: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
   /* TODO implementation bug: we can't release an attribute we don't own */;
                                                                            ^
C:\Users\111111\Desktop\libui-master\common\attribute.c: In function 'uiFreeAttribute':
C:\Users\111111\Desktop\libui-master\common\attribute.c:74:65: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
   /* TODO user bug: you can't free an attribute you don't own */;
                                                                 ^
C:\Users\111111\Desktop\libui-master\windows\areascroll.cpp:182:13: warning: 'void vscrollto(uiArea*, int)' defined but not used [-Wunused-function]
 static void vscrollto(uiArea *a, int pos)
             ^~~~~~~~~
C:\Users\111111\Desktop\libui-master\windows\areascroll.cpp:137:13: warning: 'void hscrollto(uiArea*, int)' defined but not used [-Wunused-function]
 static void hscrollto(uiArea *a, int pos)
             ^~~~~~~~~
In file included from C:\Users\111111\Desktop\libui-master\windows\winapi.hpp:36:0,
                 from C:\Users\111111\Desktop\libui-master\windows\uipriv_windows.hpp:2,
                 from C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:2:
C:\Users\111111\Desktop\libui-master\windows\attrstr.hpp:21:8: error: 'IDWriteTypography_layout_has_not_been_verified_and_its_declaration_is_most_likely_incorrect' does not name a type
 extern IDWriteTypography *uiprivOpenTypeFeaturesToIDWriteTypography(const uiOpenTypeFeatures *otf);
        ^
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp: In member function 'virtual ULONG combinedEffectsAttr::Release()':
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:116:11: warning: deleting object of polymorphic class type 'combinedEffectsAttr' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
    delete this;
           ^~~~
C:\Users\111111\Desktop\libui-master\windows\box.cpp: In function 'void boxRelayout(uiBox*)':
C:\Users\111111\Desktop\libui-master\windows\box.cpp:38:6: warning: unused variable 'i' [-Wunused-variable]
  int i;
      ^
C:\Users\111111\Desktop\libui-master\windows\box.cpp:41:19: warning: unused variable 'd' [-Wunused-variable]
  uiWindowsSizing *d;
                   ^
C:\Users\111111\Desktop\libui-master\windows\box.cpp: In function 'void uiBoxMinimumSize(uiWindowsControl*, int*, int*)':
C:\Users\111111\Desktop\libui-master\windows\box.cpp:167:6: warning: unused variable 'i' [-Wunused-variable]
  int i;
      ^
C:\Users\111111\Desktop\libui-master\windows\box.cpp:170:18: warning: unused variable 'sizing' [-Wunused-variable]
  uiWindowsSizing sizing;
                  ^~~~~~
In file included from C:\Users\111111\Desktop\libui-master\windows\winapi.hpp:36:0,
                 from C:\Users\111111\Desktop\libui-master\windows\uipriv_windows.hpp:2,
                 from C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:2:
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp: In function 'uiForEach processAttribute(const uiAttributedString*, const uiAttribute*, size_t, size_t, void*)':
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:285:2: error: 'IDWriteTypography_layout_has_not_been_verified_and_its_declaration_is_most_likely_incorrect' was not declared in this scope
  IDWriteTypography *dt;
  ^
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:285:21: error: 'dt' was not declared in this scope
  IDWriteTypography *dt;
                     ^~
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:354:8: error: 'uiprivOpenTypeFeaturesToIDWriteTypography' was not declared in this scope
   dt = uiprivOpenTypeFeaturesToIDWriteTypography(uiAttributeFeatures(attr));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:354:8: note: suggested alternative: 'uiprivOpenTypeFeaturesEqual'
   dt = uiprivOpenTypeFeaturesToIDWriteTypography(uiAttributeFeatures(attr));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        uiprivOpenTypeFeaturesEqual
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:336:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (hr != S_OK)
   ^~
C:\Users\111111\Desktop\libui-master\windows\attrstr.cpp:339:2: note: here
  case uiAttributeTypeColor:
  ^~~~
mingw32-make[2]: *** [CMakeFiles\libui.dir\build.make:301: CMakeFiles/libui.dir/windows/attrstr.cpp.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [CMakeFiles\Makefile2:67: CMakeFiles/libui.dir/all] Error 2
mingw32-make: *** [Makefile:83: all] Error 2
msink commented 6 years ago

In current master msys2 build almost works:

set PATH=C:\msys64\mingw64\bin;%PATH%
md build && cd build
cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF ..
mingw32-make

Result:

...
[100%] Linking CXX static library out\libui.a
Copying libui.res
Error copying file "F:/src/libui/build/CMakeFiles/libui.dir/windows/resources.rc.*" to "F:/src/libui/build/out/libui.res".
mingw32-make[2]: *** [CMakeFiles\libui.dir\build.make:1134: out/libui.a] Error 1
mingw32-make[2]: *** Deleting file 'out/libui.a'
mingw32-make[1]: *** [CMakeFiles\Makefile2:67: CMakeFiles/libui.dir/all] Error 2
mingw32-make: *** [Makefile:83: all] Error 2

After I change one line, build finished successfully:

diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt
index eab9ca9..bb5a306 100644
--- a/windows/CMakeLists.txt
+++ b/windows/CMakeLists.txt
@@ -75,7 +75,7 @@ macro(_handle_static)
    add_custom_command(
        TARGET libui POST_BUILD
        COMMAND
-           ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:libui,BINARY_DIR>/CMakeFiles/libui.dir/windows/resources.rc.* ${_LIBUI_STATIC_RES}
+           ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:libui,BINARY_DIR>/CMakeFiles/libui.dir/windows/resources.rc.obj ${_LIBUI_STATIC_RES}
        COMMENT "Copying libui.res")
 endmacro()

But I'm unsure if it is correct fix, What it will break?

msink commented 6 years ago

Well, I guess that asterisk should be replaced by $<CMAKE_C_OUTPUT_EXTENSION>

andlabs commented 6 years ago

What's the difference here? Does mingw32-make or whatever shell it uses not handle the asterisk properly?

I want to get rid of these kludges entirely, but I don't have an ETA on that. In the meantime, I can accept these fixes, subject to the minimum version of $<CMAKE_C_OUTPUT_EXTENSION> (both the variable itself and the $<>).

msink commented 6 years ago

355

andlabs commented 6 years ago

I still need an explanation of why that change makes things behave differently. IIRC I had no problems with my own MSYS build a few days ago (though that was from within MSYS using -G"MSYS Makefiles").

andlabs commented 6 years ago

I decided to just fix the problem by not having it in the first place: there is no more .res file to copy out or link in. Do things work now?

msink commented 6 years ago

Thanks, now static build works. Dynamic still don't, but anyway on windows static is almost always preferred. :)

Just one thing I'm not entirely happy - contents of build/out:

controlgallery.exe
cpp-multithread.exe
drawtext.exe
histogram.exe
test.exe
timer.exe
libcontrolgallery.dll.a
libcpp-multithread.dll.a
libdrawtext.dll.a
libhistogram.dll.a
libtest.dll.a
libtimer.dll.a
libui.a

Why all that *.dll.a here?

andlabs commented 6 years ago

I think that's cmake's doing; I'm not sure.

What happens on a dynamic build?

msink commented 6 years ago

Without -DBUILD_SHARED_LIBS=OFF cmake fails:

set "PATH=C:\msys64\mingw64\bin;%PATH%"
md build && cd build
cmake -G "MinGW Makefiles" ..

Result:

-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at windows/CMakeLists.txt:89 (message):
  Sorry, but libui for Windows can currently only be built as a static
  library with MinGW.  You will need to either build as a static library or
  switch to MSVC.

-- Configuring incomplete, errors occurred!
andlabs commented 6 years ago

Oh right, you're building on MinGW-w64. Yeah, DLLs aren't supported with that yet... I wonder when they will add isolation awareness support (if at all).

msink commented 6 years ago

Hm. I tried to remove last if in windows/CMakeLists.txt - actually build works, but resulted programs are not "themed" - like in Windows-95.

andlabs commented 6 years ago

Yes, because isolation awareness is needed for the DLL to get Common Controls 6. Otherwise, you would have to apply the respective manifest to the whole application. Side-by-Side Assemblies is weird.

andlabs commented 5 years ago

Any updates?

andlabs commented 5 years ago

I have started properly documenting libui, and there will now be a page for how to properly use libui as a static library. The page will not be relevant to the current release, but it will be to the next.

fxqy commented 2 years ago

After reading this problem, I finally succeeded in using a static library, so I can record it. Is it useful to you, I use mingw32 under msys2 image

I download static lib from here: libs

testlui.c

// 2 september 2015
#include <stdio.h>
#include <string.h>
#include "ui.h"

static int onClosing(uiWindow *w, void *data)
{
    uiQuit();
    return 1;
}

static int onShouldQuit(void *data)
{
    uiWindow *mainwin = uiWindow(data);

    uiControlDestroy(uiControl(mainwin));
    return 1;
}

static uiControl *makeBasicControlsPage(void)
{
    uiBox *vbox;
    uiBox *hbox;
    uiGroup *group;
    uiForm *entryForm;

    vbox = uiNewVerticalBox();
    uiBoxSetPadded(vbox, 1);

    hbox = uiNewHorizontalBox();
    uiBoxSetPadded(hbox, 1);
    uiBoxAppend(vbox, uiControl(hbox), 0);

    uiBoxAppend(hbox,
        uiControl(uiNewButton("Button")),
        0);
    uiBoxAppend(hbox,
        uiControl(uiNewCheckbox("Checkbox")),
        0);

    uiBoxAppend(vbox,
        uiControl(uiNewLabel("This is a label. Right now, labels can only span one line.")),
        0);

    uiBoxAppend(vbox,
        uiControl(uiNewHorizontalSeparator()),
        0);

    group = uiNewGroup("Entries");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(vbox, uiControl(group), 1);

    entryForm = uiNewForm();
    uiFormSetPadded(entryForm, 1);
    uiGroupSetChild(group, uiControl(entryForm));

    uiFormAppend(entryForm,
        "Entry",
        uiControl(uiNewEntry()),
        0);
    uiFormAppend(entryForm,
        "Password Entry",
        uiControl(uiNewPasswordEntry()),
        0);
    uiFormAppend(entryForm,
        "Search Entry",
        uiControl(uiNewSearchEntry()),
        0);
    uiFormAppend(entryForm,
        "Multiline Entry",
        uiControl(uiNewMultilineEntry()),
        1);
    uiFormAppend(entryForm,
        "Multiline Entry No Wrap",
        uiControl(uiNewNonWrappingMultilineEntry()),
        1);

    return uiControl(vbox);
}

// TODO make these not global
static uiSpinbox *spinbox;
static uiSlider *slider;
static uiProgressBar *pbar;

static void onSpinboxChanged(uiSpinbox *s, void *data)
{
    uiSliderSetValue(slider, uiSpinboxValue(s));
    uiProgressBarSetValue(pbar, uiSpinboxValue(s));
}

static void onSliderChanged(uiSlider *s, void *data)
{
    uiSpinboxSetValue(spinbox, uiSliderValue(s));
    uiProgressBarSetValue(pbar, uiSliderValue(s));
}

static uiControl *makeNumbersPage()
{
    uiBox *hbox;
    uiGroup *group;
    uiBox *vbox;
    uiProgressBar *ip;
    uiCombobox *cbox;
    uiEditableCombobox *ecbox;
    uiRadioButtons *rb;

    hbox = uiNewHorizontalBox();
    uiBoxSetPadded(hbox, 1);

    group = uiNewGroup("Numbers");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(hbox, uiControl(group), 1);

    vbox = uiNewVerticalBox();
    uiBoxSetPadded(vbox, 1);
    uiGroupSetChild(group, uiControl(vbox));

    spinbox = uiNewSpinbox(0, 100);
    slider = uiNewSlider(0, 100);
    pbar = uiNewProgressBar();
    uiSpinboxOnChanged(spinbox, onSpinboxChanged, NULL);
    uiSliderOnChanged(slider, onSliderChanged, NULL);
    uiBoxAppend(vbox, uiControl(spinbox), 0);
    uiBoxAppend(vbox, uiControl(slider), 0);
    uiBoxAppend(vbox, uiControl(pbar), 0);

    ip = uiNewProgressBar();
    uiProgressBarSetValue(ip, -1);
    uiBoxAppend(vbox, uiControl(ip), 0);

    group = uiNewGroup("Lists");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(hbox, uiControl(group), 1);

    vbox = uiNewVerticalBox();
    uiBoxSetPadded(vbox, 1);
    uiGroupSetChild(group, uiControl(vbox));

    cbox = uiNewCombobox();
    uiComboboxAppend(cbox, "Combobox Item 1");
    uiComboboxAppend(cbox, "Combobox Item 2");
    uiComboboxAppend(cbox, "Combobox Item 3");
    uiBoxAppend(vbox, uiControl(cbox), 0);

    ecbox = uiNewEditableCombobox();
    uiEditableComboboxAppend(ecbox, "Editable Item 1");
    uiEditableComboboxAppend(ecbox, "Editable Item 2");
    uiEditableComboboxAppend(ecbox, "Editable Item 3");
    uiBoxAppend(vbox, uiControl(ecbox), 0);

    rb = uiNewRadioButtons();
    uiRadioButtonsAppend(rb, "Radio Button 1");
    uiRadioButtonsAppend(rb, "Radio Button 2");
    uiRadioButtonsAppend(rb, "Radio Button 3");
    uiBoxAppend(vbox, uiControl(rb), 0);

    return uiControl(hbox);
}

// TODO make this not global
static uiWindow *mainwin;

static void onOpenFileClicked(uiButton *b, void *data)
{
    uiEntry *entry = uiEntry(data);
    char *filename;

    filename = uiOpenFile(mainwin);
    if (filename == NULL) {
        uiEntrySetText(entry, "(cancelled)");
        return;
    }
    uiEntrySetText(entry, filename);
    uiFreeText(filename);
}

static void onSaveFileClicked(uiButton *b, void *data)
{
    uiEntry *entry = uiEntry(data);
    char *filename;

    filename = uiSaveFile(mainwin);
    if (filename == NULL) {
        uiEntrySetText(entry, "(cancelled)");
        return;
    }
    uiEntrySetText(entry, filename);
    uiFreeText(filename);
}

static void onMsgBoxClicked(uiButton *b, void *data)
{
    uiMsgBox(mainwin,
        "This is a normal message box.",
        "More detailed information can be shown here.");
}

static void onMsgBoxErrorClicked(uiButton *b, void *data)
{
    uiMsgBoxError(mainwin,
        "This message box describes an error.",
        "More detailed information can be shown here.");
}

static uiControl *makeDataChoosersPage(void)
{
    uiBox *hbox;
    uiBox *vbox;
    uiGrid *grid;
    uiButton *button;
    uiEntry *entry;
    uiGrid *msggrid;

    hbox = uiNewHorizontalBox();
    uiBoxSetPadded(hbox, 1);

    vbox = uiNewVerticalBox();
    uiBoxSetPadded(vbox, 1);
    uiBoxAppend(hbox, uiControl(vbox), 0);

    uiBoxAppend(vbox,
        uiControl(uiNewDatePicker()),
        0);
    uiBoxAppend(vbox,
        uiControl(uiNewTimePicker()),
        0);
    uiBoxAppend(vbox,
        uiControl(uiNewDateTimePicker()),
        0);

    uiBoxAppend(vbox,
        uiControl(uiNewFontButton()),
        0);
    uiBoxAppend(vbox,
        uiControl(uiNewColorButton()),
        0);

    uiBoxAppend(hbox,
        uiControl(uiNewVerticalSeparator()),
        0);

    vbox = uiNewVerticalBox();
    uiBoxSetPadded(vbox, 1);
    uiBoxAppend(hbox, uiControl(vbox), 1);

    grid = uiNewGrid();
    uiGridSetPadded(grid, 1);
    uiBoxAppend(vbox, uiControl(grid), 0);

    button = uiNewButton("Open File");
    entry = uiNewEntry();
    uiEntrySetReadOnly(entry, 1);
    uiButtonOnClicked(button, onOpenFileClicked, entry);
    uiGridAppend(grid, uiControl(button),
        0, 0, 1, 1,
        0, uiAlignFill, 0, uiAlignFill);
    uiGridAppend(grid, uiControl(entry),
        1, 0, 1, 1,
        1, uiAlignFill, 0, uiAlignFill);

    button = uiNewButton("Save File");
    entry = uiNewEntry();
    uiEntrySetReadOnly(entry, 1);
    uiButtonOnClicked(button, onSaveFileClicked, entry);
    uiGridAppend(grid, uiControl(button),
        0, 1, 1, 1,
        0, uiAlignFill, 0, uiAlignFill);
    uiGridAppend(grid, uiControl(entry),
        1, 1, 1, 1,
        1, uiAlignFill, 0, uiAlignFill);

    msggrid = uiNewGrid();
    uiGridSetPadded(msggrid, 1);
    uiGridAppend(grid, uiControl(msggrid),
        0, 2, 2, 1,
        0, uiAlignCenter, 0, uiAlignStart);

    button = uiNewButton("Message Box");
    uiButtonOnClicked(button, onMsgBoxClicked, NULL);
    uiGridAppend(msggrid, uiControl(button),
        0, 0, 1, 1,
        0, uiAlignFill, 0, uiAlignFill);
    button = uiNewButton("Error Box");
    uiButtonOnClicked(button, onMsgBoxErrorClicked, NULL);
    uiGridAppend(msggrid, uiControl(button),
        1, 0, 1, 1,
        0, uiAlignFill, 0, uiAlignFill);

    return uiControl(hbox);
}

int main(void)
{
    uiInitOptions options;
    const char *err;
    uiTab *tab;

    memset(&options, 0, sizeof (uiInitOptions));
    err = uiInit(&options);
    if (err != NULL) {
        fprintf(stderr, "error initializing libui: %s", err);
        uiFreeInitError(err);
        return 1;
    }

    mainwin = uiNewWindow("libui Control Gallery", 640, 480, 1);
    uiWindowOnClosing(mainwin, onClosing, NULL);
    uiOnShouldQuit(onShouldQuit, mainwin);

    tab = uiNewTab();
    uiWindowSetChild(mainwin, uiControl(tab));
    uiWindowSetMargined(mainwin, 1);

    uiTabAppend(tab, "Basic Controls", makeBasicControlsPage());
    uiTabSetMargined(tab, 0, 1);

    uiTabAppend(tab, "Numbers and Lists", makeNumbersPage());
    uiTabSetMargined(tab, 1, 1);

    uiTabAppend(tab, "Data Choosers", makeDataChoosersPage());
    uiTabSetMargined(tab, 2, 1);

    uiControlShow(uiControl(mainwin));
    uiMain();
    return 0;
}

#if 0

static void openClicked(uiMenuItem *item, uiWindow *w, void *data)
{
    char *filename;

    filename = uiOpenFile(mainwin);
    if (filename == NULL) {
        uiMsgBoxError(mainwin, "No file selected", "Don't be alarmed!");
        return;
    }
    uiMsgBox(mainwin, "File selected", filename);
    uiFreeText(filename);
}

static void saveClicked(uiMenuItem *item, uiWindow *w, void *data)
{
    char *filename;

    filename = uiSaveFile(mainwin);
    if (filename == NULL) {
        uiMsgBoxError(mainwin, "No file selected", "Don't be alarmed!");
        return;
    }
    uiMsgBox(mainwin, "File selected (don't worry, it's still there)", filename);
    uiFreeText(filename);
}

static uiSpinbox *spinbox;
static uiSlider *slider;
static uiProgressBar *progressbar;

static void update(int value)
{
    uiSpinboxSetValue(spinbox, value);
    uiSliderSetValue(slider, value);
    uiProgressBarSetValue(progressbar, value);
}

static void onSpinboxChanged(uiSpinbox *s, void *data)
{
    update(uiSpinboxValue(spinbox));
}

static void onSliderChanged(uiSlider *s, void *data)
{
    update(uiSliderValue(slider));
}

int main(int argc, char* [] argv)
{
    uiInitOptions o;
    const char *err;
    uiMenu *menu;
    uiMenuItem *item;
    uiBox *box;
    uiBox *hbox;
    uiGroup *group;
    uiBox *inner;
    uiBox *inner2;
    uiEntry *entry;
    uiCombobox *cbox;
    uiEditableCombobox *ecbox;
    uiRadioButtons *rb;
    uiTab *tab;

    memset(&o, 0, sizeof (uiInitOptions));
    err = uiInit(&o);
    if (err != NULL) {
        fprintf(stderr, "error initializing ui: %s\n", err);
        uiFreeInitError(err);
        return 1;
    }

    menu = uiNewMenu("File");
    item = uiMenuAppendItem(menu, "Open");
    uiMenuItemOnClicked(item, openClicked, NULL);
    item = uiMenuAppendItem(menu, "Save");
    uiMenuItemOnClicked(item, saveClicked, NULL);
    item = uiMenuAppendQuitItem(menu);
    uiOnShouldQuit(shouldQuit, NULL);

    menu = uiNewMenu("Edit");
    item = uiMenuAppendCheckItem(menu, "Checkable Item");
    uiMenuAppendSeparator(menu);
    item = uiMenuAppendItem(menu, "Disabled Item");
    uiMenuItemDisable(item);
    item = uiMenuAppendPreferencesItem(menu);

    menu = uiNewMenu("Help");
    item = uiMenuAppendItem(menu, "Help");
    item = uiMenuAppendAboutItem(menu);

    mainwin = uiNewWindow("libui Control Gallery", 640, 480, 1);
    uiWindowSetMargined(mainwin, 1);
    uiWindowOnClosing(mainwin, onClosing, NULL);

    box = uiNewVerticalBox();
    uiBoxSetPadded(box, 1);
    uiWindowSetChild(mainwin, uiControl(box));

    hbox = uiNewHorizontalBox();
    uiBoxSetPadded(hbox, 1);
    uiBoxAppend(box, uiControl(hbox), 1);

    group = uiNewGroup("Basic Controls");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(hbox, uiControl(group), 0);

    inner = uiNewVerticalBox();
    uiBoxSetPadded(inner, 1);
    uiGroupSetChild(group, uiControl(inner));

    uiBoxAppend(inner,
        uiControl(uiNewButton("Button")),
        0);
    uiBoxAppend(inner,
        uiControl(uiNewCheckbox("Checkbox")),
        0);
    entry = uiNewEntry();
    uiEntrySetText(entry, "Entry");
    uiBoxAppend(inner,
        uiControl(entry),
        0);
    uiBoxAppend(inner,
        uiControl(uiNewLabel("Label")),
        0);

    uiBoxAppend(inner,
        uiControl(uiNewHorizontalSeparator()),
        0);

    uiBoxAppend(inner,
        uiControl(uiNewDatePicker()),
        0);
    uiBoxAppend(inner,
        uiControl(uiNewTimePicker()),
        0);
    uiBoxAppend(inner,
        uiControl(uiNewDateTimePicker()),
        0);

    uiBoxAppend(inner,
        uiControl(uiNewFontButton()),
        0);

    uiBoxAppend(inner,
        uiControl(uiNewColorButton()),
        0);

    inner2 = uiNewVerticalBox();
    uiBoxSetPadded(inner2, 1);
    uiBoxAppend(hbox, uiControl(inner2), 1);

    group = uiNewGroup("Numbers");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(inner2, uiControl(group), 0);

    inner = uiNewVerticalBox();
    uiBoxSetPadded(inner, 1);
    uiGroupSetChild(group, uiControl(inner));

    spinbox = uiNewSpinbox(0, 100);
    uiSpinboxOnChanged(spinbox, onSpinboxChanged, NULL);
    uiBoxAppend(inner, uiControl(spinbox), 0);

    slider = uiNewSlider(0, 100);
    uiSliderOnChanged(slider, onSliderChanged, NULL);
    uiBoxAppend(inner, uiControl(slider), 0);

    progressbar = uiNewProgressBar();
    uiBoxAppend(inner, uiControl(progressbar), 0);

    group = uiNewGroup("Lists");
    uiGroupSetMargined(group, 1);
    uiBoxAppend(inner2, uiControl(group), 0);

    inner = uiNewVerticalBox();
    uiBoxSetPadded(inner, 1);
    uiGroupSetChild(group, uiControl(inner));

    cbox = uiNewCombobox();
    uiComboboxAppend(cbox, "Combobox Item 1");
    uiComboboxAppend(cbox, "Combobox Item 2");
    uiComboboxAppend(cbox, "Combobox Item 3");
    uiBoxAppend(inner, uiControl(cbox), 0);

    ecbox = uiNewEditableCombobox();
    uiEditableComboboxAppend(ecbox, "Editable Item 1");
    uiEditableComboboxAppend(ecbox, "Editable Item 2");
    uiEditableComboboxAppend(ecbox, "Editable Item 3");
    uiBoxAppend(inner, uiControl(ecbox), 0);

    rb = uiNewRadioButtons();
    uiRadioButtonsAppend(rb, "Radio Button 1");
    uiRadioButtonsAppend(rb, "Radio Button 2");
    uiRadioButtonsAppend(rb, "Radio Button 3");
    uiBoxAppend(inner, uiControl(rb), 1);

    tab = uiNewTab();
    uiTabAppend(tab, "Page 1", uiControl(uiNewHorizontalBox()));
    uiTabAppend(tab, "Page 2", uiControl(uiNewHorizontalBox()));
    uiTabAppend(tab, "Page 3", uiControl(uiNewHorizontalBox()));
    uiBoxAppend(inner2, uiControl(tab), 1);

    uiControlShow(uiControl(mainwin));
    uiMain();
    uiUninit();
    return 0;
}

#endif

lui.static.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="*"
    name="CompanyName.ProductName.YourApplication"
    type="win32"
/>
<description>Your application description here.</description>
<!-- we DO need comctl6 in the static case -->
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="*"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
        <!--The ID below indicates application support for Windows Vista -->
        <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
        <!--The ID below indicates application support for Windows 7 -->
        <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
    </application>
</compatibility>
</assembly>

resource.rc

// 30 may 2015

// this is a UTF-8 file
#pragma code_page(65001)

// this is the Common Controls 6 manifest
// TODO set up the string values here
// 1 is the value of CREATEPROCESS_MANIFEST_RESOURCE_ID and 24 is the value of RT_MANIFEST; we use it directly to avoid needing to share winapi.h with the tests and examples

1 24 "lui.static.manifest"

Makefile


CC=g++
RM=rm -f
TGT=lui.exe

OBJS=testlui.o resource.o
LINKS=-static -static-libgcc -static-libstdc++ -lui -luser32 -lkernel32 -lusp10 \
    -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc \
    # -mwindows

all: $(OBJS)
    $(CC) $(OBJS) $(LINKS) -o $(TGT)

testlui.o: testlui.c
    $(CC) -c testlui.c

resource.o: resource.rc
    windres -i resource.rc -o resource.o

.PHONEY: clean
clean:
    $(RM) *.o 

testlibui.zip