{"action":"created","issue":{"url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/32","repository_url":"https://api.github.com/repos/Gekkio/imgui-rs","labels_url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/32/comments","events_url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/32/events","html_url":"https://github.com/Gekkio/imgui-rs/pull/32","id":165979980,"number":32,"title":"Add compiling notice for Windows users in README","user":{"login":"abadd","id":9344199,"avatar_url":"https://avatars.githubusercontent.com/u/9344199?v=3","gravatar_id":"","url":"https://api.github.com/users/abadd","html_url":"https://github.com/abadd","followers_url":"https://api.github.com/users/abadd/followers","following_url":"https://api.github.com/users/abadd/following{/other_user}","gists_url":"https://api.github.com/users/abadd/gists{/gist_id}","starred_url":"https://api.github.com/users/abadd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abadd/subscriptions","organizations_url":"https://api.github.com/users/abadd/orgs","repos_url":"https://api.github.com/users/abadd/repos","events_url":"https://api.github.com/users/abadd/events{/privacy}","received_events_url":"https://api.github.com/users/abadd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-17T14:52:17Z","updated_at":"2016-07-28T09:53:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Gekkio/imgui-rs/pulls/32","html_url":"https://github.com/Gekkio/imgui-rs/pull/32","diff_url":"https://github.com/Gekkio/imgui-rs/pull/32.diff","patch_url":"https://github.com/Gekkio/imgui-rs/pull/32.patch"},"body":"The library will compile with the GNU version of the Rust if the underlying required Windows dependencies can be found during compilation but runtime errors will occur when running the samples due to the incompatible ABI.  I built the library and ran the examples successfully on two different machine running different versions of Windows using the Rust MSVC compiler with the latest Visual Studio 2015 C++ tools installed."},"comment":{"url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/comments/235851217","html_url":"https://github.com/Gekkio/imgui-rs/pull/32#issuecomment-235851217","issue_url":"https://api.github.com/repos/Gekkio/imgui-rs/issues/32","id":235851217,"user":{"login":"Gekkio","id":94033,"avatar_url":"https://avatars.githubusercontent.com/u/94033?v=3","gravatar_id":"","url":"https://api.github.com/users/Gekkio","html_url":"https://github.com/Gekkio","followers_url":"https://api.github.com/users/Gekkio/followers","following_url":"https://api.github.com/users/Gekkio/following{/other_user}","gists_url":"https://api.github.com/users/Gekkio/gists{/gist_id}","starred_url":"https://api.github.com/users/Gekkio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gekkio/subscriptions","organizations_url":"https://api.github.com/users/Gekkio/orgs","repos_url":"https://api.github.com/users/Gekkio/repos","events_url":"https://api.github.com/users/Gekkio/events{/privacy}","received_events_url":"https://api.github.com/users/Gekkio/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T09:53:50Z","updated_at":"2016-07-28T09:53:50Z","body":"Thanks! I now know what the problem is: MinGW actually has some ABI-affecting options which cannot be mixed and matched. There's two important options that are either asked by an installer, or are chosen in advance and mentioned in the package file name:\r\n\r\nThreading model: win32 vs posix\r\nExceptions: seh vs sjlj vs dwarf\r\n\r\nYou need a MinGW installation that matches with the choices made by Rust. Otherwise the C compiler can generate code that is incompatible with Rust code. The easiest way of checking the settings is finding the minimal `gcc.exe` included with Rust.\r\n\r\nFor example, on a Windows machine I'm using now:\r\n\r\n```\r\nC:\\Program Files\\Rust stable GNU 1.10\\lib\\rustlib\\x86_64-pc-windows-gnu\\bin>gcc -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=gcc\r\nTarget: x86_64-w64-mingw32\r\nConfigured with: ../../../src/gcc-4.9.1/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x86_64-win32-seh-rev1, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64/opt/include -I/c/mingw491/prerequisites/x86_64-zlib-static/include -I/c/mingw491/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64/opt/include -I/c/mingw491/prerequisites/x86_64-zlib-static/include -I/c/mingw491/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64/opt/lib -L/c/mingw491/prerequisites/x86_64-zlib-static/lib -L/c/mingw491/prerequisites/x86_64-w64-mingw32-static/lib '\r\nThread model: win32\r\ngcc version 4.9.1 (x86_64-win32-seh-rev1, Built by MinGW-W64 project)\r\n```\r\n\r\n`Thread model: win32` and `seh` mentioned in names hint that win32, seh is the right choice for 64-bit. I think I remember 32-bit Rust using slightly different settings (dwarf instead of seh maybe...?).\r\nNow, the `gcc -v` log that you provided shows instead `Thread model: posix` and `--enable-sjlj-exceptions`, so it uses posix, sjlj.\r\n\r\nSo, this is not really a problem in imgui-rs, but a more fundamental complication with MinGW. I find it shocking that it doesn't seem to be mentioned very often in documentation :fearful: "}}
{"actor":{"display_login":"Gekkio"}}