ihalila / pdcurses-sys

PDCurses Rust FFI bindings
MIT License
17 stars 1 forks source link

Incompatibility with GNU ABI on Windows #4

Open Jimmio92 opened 5 years ago

Jimmio92 commented 5 years ago

This is likely the pdcurses library itself at fault, but building under the GNU ABI throws errors about standard input/output related things like undefined reference to__imp___acrt_iob_func'` and the like. Should I also file a bug report for pdcurses (the fork listed in the readme)?

ihalila commented 5 years ago

Sure, if that's where the issue is. Not sure when I'll have much time to look into this though.

GammaWatt commented 5 years ago

I think this is a problem with rust's version of libraries included in the toolchains (files in the .rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\ directory) as per rust issue #47048.

I managed to get the usage example in the pancurses readme working by following the comment made by @DezzK there.

I overwritten all *.o files in the gnu toolchain with corresponding files from Msys2 and all linking problems gone!

link to comment

It's quite sloppy, unideal for those who don't want a full msys2 on their system (or all the lib files for that matter), and prior comments may offer more surgical solutions. But it's working and it matches my development environment...

For convenience, I've created a zipfile with all of the library files present in my msys2 directory (7.5MB) that can be downloaded here. I believe using this will negate the need to install a complete msys2 environment to copy from. But again, it is simply convenience if one really does not want an msys2 environment installed simply for this "fix".

Env Var Value
OS: Windows 10
Version: 1809
Build: 17763.379