windows.h: No such file or directory
Closed this issue · 7 comments
Getting this error in some packages when trying to run "ninja mpv".
cat /home/avatar/local/build/mpv-winbuild-cmake/build64/packages/xz-prefix/src/xz-stamp/xz-build-err.log
In file included from common/common.h:17,
from common/hardware_physmem.c:13:
../../src/common/mythread.h:364:10: fatal error: windows.h: No such file or directory
364 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
Have you run any command before 'ninja mpv'?
Please follow these guides: https://github.com/shinchiro/mpv-winbuild-cmake#compiling-with-gcc or https://github.com/shinchiro/mpv-winbuild-cmake#compiling-with-clang.
I think you can put your problems into one issue.
I ran
cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DGCC_ARCH=x86-64-v3 -G Ninja -B build64
What do the other flags do and what do I set them to? I'm pretty sure '/home/shinchiro/packages' is not the exact value I should be using, and simply replacing the username doesn't seem to make sense or to help.
I think you can put your problems into one issue.
Hmm, if I get several unrelated build issues, it seems better to treat them separately so that others will find it easier to search based on the error message and they can be closed separately as they get fixed. Perhaps you meant something else though?
They are completely related, one could even say they are the same problem, caused by not completing the preparation properly.
Delete all old files and folders,then start over in a new place:
git clone https://github.com/shinchiro/mpv-winbuild-cmake.git
cd mpv-winbuild-cmake
cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DGCC_ARCH=x86-64-v3 -DCOMPILER_TOOLCHAIN=gcc -DALWAYS_REMOVE_BUILDFILES=ON -DSINGLE_SOURCE_LOCATION="$(pwd)/packages" -DRUSTUP_LOCATION="$(pwd)/install_rustup" -G Ninja -B build64
cd build64
ninja download
ninja gcc
ninja update
ninja mpv
When you don't know the effect, please don't modify the parameters.
Please don't change the execution order
Please don't continue the next step in case of an error report.
Please input and execute the above commands step by step as they are.
read and search in https://github.com/shinchiro/mpv-winbuild-cmake/blob/master/CMakeLists.txt or cmake's manual for every flag's meaning
That's all the help I can offer.
I have ended up using a different tool for now, so I didn't try your command. But if your command is the one that works, could we put it in the readme instead of the one that doesn't?
It's there in readme
The command that I currently see in the readme is
cmake -DTARGET_ARCH=x86_64-w64-mingw32 \
-DGCC_ARCH=x86-64-v3 \
-DALWAYS_REMOVE_BUILDFILES=ON \
-DSINGLE_SOURCE_LOCATION="/home/shinchiro/packages" \
-DRUSTUP_LOCATION="/home/shinchiro/install_rustup" \
-G Ninja -B build64 -S mpv-winbuild-cmake