tpoechtrager / wclang

Cross compile source code easily for Windows with clang on Linux/Unix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find x86_64-w64-mingw32 C++ headers

svost opened this issue · comments

commented

Hello.
How better to solve this problem?
/opt/wc390/bin/x86_64-w64-mingw32-clang++ -wc-help
cannot find x86_64-w64-mingw32 C++ headers
make sure x86_64-w64-mingw32 C++ headers are installed on your system
svost@linux-63qq:~/src/AssemblyLoader>
svost@linux-63qq:/usr/x86_64-w64-mingw32/sys-root/mingw> pwd
/usr/x86_64-w64-mingw32/sys-root/mingw
svost@linux-63qq:/usr/x86_64-w64-mingw32/sys-root/mingw> ls -l
итого 0
drwxr-xr-x 1 root root 202 ноя 7 08:43 bin
drwxr-xr-x 1 root root 25978 ноя 7 08:43 include
drwxr-xr-x 1 root root 30796 ноя 7 08:43 lib
drwxr-xr-x 1 root root 6 ноя 7 08:43 libexec
drwxr-xr-x 1 root root 72 ноя 7 08:43 share
drwxr-xr-x 1 root root 6 ноя 7 08:43 var
also present this folder
/usr/lib64/gcc/x86_64-w64-mingw32/6.2.0/include/c++
svost@linux-63qq:/usr/x86_64-w64-mingw32/sys-root/mingw> /usr/bin/x86_64-w64-mingw32-g++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/x86_64-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-w64-mingw32/6.2.0/lto-wrapper
Target: x86_64-w64-mingw32
Configured with: ../configure --prefix=/usr --bindir=/usr/bin --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --build=x86_64-suse-linux-gnu --host=x86_64-suse-linux-gnu --target=x86_64-w64-mingw32 --with-gnu-as --with-gnu-ld --verbose --without-newlib --disable-multilib --disable-plugin --with-system-zlib --disable-nls --without-included-gettext --disable-win32-registry --enable-version-specific-runtime-libs --with-sysroot=/usr/x86_64-w64-mingw32/sys-root --enable-languages=c,c++,fortran,objc,obj-c++ --without-x --enable-hash-synchronization --enable-fully-dynamic-string --enable-libgomp --enable-linker-build-id --disable-vtable-verify
Thread model: win32
gcc version 6.2.0 (GCC)
svost@linux-63qq:/usr/x86_64-w64-mingw32/sys-root/mingw>
svost@linux-63qq:/etc> cat SuSE-release
openSUSE 42.1 (x86_64)
VERSION = 42.1
CODENAME = Malachite

Is this still an issue?

I received this as an issue on Fedora 28. What info would you need to debug?

You might not have all the necessary headers installed. I had exactly the same error message.

I could fix it by installing mingw-w64:

# apt install mingw-w64

This provided me the required headers in /usr/i686-w64-mingw32/include/. These belong to the mingw-w64-i686-dev package:

# dpkg -S /usr/i686-w64-mingw32/include/
mingw-w64-i686-dev: /usr/i686-w64-mingw32/include

After this, I was able to use x86_64-w64-mingw32-g++.

Best,
Mänu