-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc seems broken #10761
Comments
There is a core change in system crt and headers. So, GCC is being rebuilt in CI right now. Please wait for the fix. |
OK, thank you for the quick reply! |
Is it related to the following behavior or do I need to open a newer ticket for this ? mingw-w64-ucrt-x86_64-headers-git -> 9.0.0.6364_.2194d504e-1headers are located in mingw-w64-ucrt-x86_64-headers-git -> 9.0.0.6373.5be8fcd83-1headers are also located in mingw-w64-ucrt-x86_64-headers-git -> 9.0.0.6373.5be8fcd83-2headers are relocated to Thank you for helping PS: @omichel If this is same behavior, a temp fix is to symlink |
Oh, I didn't realize that the gcc update was needed since I build various things without it locally. I'll look into updating things |
Please try again now. |
Nope: I am still getting the exact same error after updating to the latest gcc packages:
|
thanks, yeah, something is still off. I can't reproduce though. |
@omichel Please provide the project link and details about how to compile it. |
It's there: https://github.com/cyberbotics/webots/wiki/Windows-installation/ |
GCC upgrade to
|
Edit: Issue reported to the CLion team here https://youtrack.jetbrains.com/issue/CPP-28403 indeed I think CLion checks for a static file location for checking the validity of the toolchain because that's what show the Java stacktrace
Ty for helping out guys, I think I don't have a better solution yet than creating a symlink while waiting for the newest CLion 2022.1 :) |
I'm having the same issue with my MinGW64 CI: https://github.com/DigitalPulseSoftware/NazaraEngine/runs/5231389195?check_suite_focus=true#step:10:52 |
@SirLynix If I run xmake it starts to build all the dependencies. Some of them are already in mingw packages. Is it possible not to build all those dependencies from source? BTW, it may be better to discuss an issue in that repository. This thread will be going longer. |
Sure. |
I ran this:
First, it tries to build assimp. In the output, all the dependencies are shown in red no. |
It should give you a list of the missing packages before installing them, was there only assimp on it? Since this isn't relevant to this issue, feel free to send me a mail or open an issue on my repository. |
I think I ran into the same experience:
https://gitlab.com/free-astro/siril/-/jobs/2107398233 But difficult to say as the output is different. @lazka : maybe the log could help you to reproduce. |
I had a similar problem, building libtiff on mingw ci failed, stdint.h not found But it worked a few days ago. https://github.com/xmake-io/xmake-repo/runs/5234506913?check_suite_focus=true -- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - not found
-- Check size of size_t
-- Check size of size_t - failed
CMake Error at cmake/TypeSizeChecks.cmake:51 (message):
Unsupported size_t size ; please add support git clone https://github.com/xmake-io/xmake-repo.git
cd xmake-repo
xmake l scripts/test.lua -vD --shallow -p mingw libtiff |
@waruqi I am not sure what happen in xmake. I have compiled libtiff from source using CMake and Ninja and it builds fine. Here are my steps:
And here is the same output in cmake where xmake failed.
|
@lock042 |
@Biswa96 : yes I use crossroad that uses Msys2. |
Then the issue should be reported crossroad. Feel free to ping me there. Or you can also use msys2 in GitLab. Many projects like pango, gstreamer etc. use msys2 in GitLab CI. |
I managed to reduce the problem to a very simple /*
g++ -isystem /mingw64/include hello_world.cpp -o hello_world.exe
fails with:
In file included from C:/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h:59,
from C:/msys64/mingw64/include/c++/11.2.0/algorithm:62,
from C:/msys64/mingw64/include/QtCore/qglobal.h:142,
from C:/msys64/mingw64/include/QtCore/qchar.h:43,
from C:/msys64/mingw64/include/QtCore/qstring.h:49,
from C:/msys64/mingw64/include/QtCore/QString:1,
from hello_world.cpp:5:
C:/msys64/mingw64/include/c++/11.2.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
75 | #include_next <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
Removing "-isystem /mingw64/include" fixes the problem
*/
#include <QtCore/QString>
int main(int argc, char *argv[]) {
printf("Hello World!\n");
return 1;
} |
Sounds like an gcc issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 |
Yes, luckily the fix is very simple: remove We can probably close the issue now. |
It will set If I set CMAKE_SYSROOT, this problem comes up, If I remove it, everything works fine. But a few days ago everything was ok and I didn't make any other changes. It works fine even with CMAKE_SYSROOT set. |
So, it is not required anymore, isn't that a feature? 😄 As far as I know, CMAKE_SYSROOT passes |
Do you remember which project? In theory meson filters out isystem. Meson can also call into cmake via subprojects though, maybe that way? |
not of the top of my head sorry :/ but yeah it could have done that. |
several packages have none existing sources links in the PKGBUILDS pcre for one but there are several others. also some packages can no longer build with the updated libraries like cninja which is looking for a no longer existing file in catch2. sadly i cannot give much further help on the gcc problem as i reverted the path changes locally, so im not experiencing the problems we had before anymore. |
no not that one it is looking for catch.hpp which no longer exists it is now called catch-all.hpp |
I've created #13608 for the cmake issue. If there is anything else unsolved here I'd be grateful if it would be extracted into a separate issue as well, so we can close this. |
only the allready mentioned issues cninja etc. tbh i newer quite get why we had to change the way system libraries was handled ? it worked as it was. Now we have to create workarounds for any package that deviates from the structure of the new system. |
msys2 pkg-config adds root system include path among -I flags and passing it with -isystem isn't supported by gcc, and the workaround of passing --dont-define-prefix to pkg-config doesn't work on msys2's "subsystem" install of scons because posix style absolute paths aren't handled properly when expanding CPPPATH. Most likely related to msys2/MINGW-packages#10761
Does not seem to be exactly linked to this issue, rather it seems you may just have issues with linking, not with the headers. You may want to research more on linking in general, but as a start point, I would suggest looking into how to use pkg-config. If you want an exact answer, try running gcc $(pkgconf --static --cflags jansson libcurl) main.c $(pkgconf --static --libs jansson libcurl) instead of just |
why need "include_next" in these files? It makes me almost uninstall msys2 again. |
@lotest this is how GCC developers implemented inclusion of As another thing to try, I'd suggest adding GCC to the beginning of your PATH. If it's absent, the search paths don't seem correct (it doesn't print anything):
With proper PATH you can see |
@mati865 Appreciate for your reply with detail information! I can reproduce the error when using "/mingw64". In my code, just include and <SDL2/SDL.h> then compile, the "include_next" issue comes out, the simple solution is replace include_next to include. And I changed my system to /ucrt64 ,follow your instruction, my code could run perfectly. Thanks a lot! |
can someone explain Why theses files is missing I installed the gcc via Mysys2 and made sure is all updated. #include <windows.h>
#include <shellscalingapi.h>
#include <stdio.h>
int main() {
// Set the process to be DPI aware
SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
char name[] = "Max";
MessageBoxA(0, name, "AAA", 1);
ShellMessageBoxA(0, 0, "ssss", "hhh", 0);
printf("%s", name);
return 0;
} missing files
|
should I copy-paste this? |
uh no you need the mingw compiler and api packages from here. |
@xmaxrayx can you post full compiler output when building your code with added |
indeed the config.log would tell us much :) basic C is not that hard agreed ;) but like with C++ you can make code that is extremely hard to comprehend for others. |
idk why it tries to search in EDIT : I see why now because my code files there
|
This directory was used on CI to build GCC, so it became hardcoded as a search path. Regarding your error, it's an entirely different error from your previous comment. This one indicates missing |
Ok many thanks , but how did you know that? PS D:\MaxLife\Programming\Learn\C> gcc -v -lshcore "Hellow world.c"
Using built-in specs.
COLLECT_GCC=C:\msys64\ucrt64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Rev3, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a-'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/cc1.exe -quiet -v -iprefix C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/ -D_REENTRANT Hellow world.c -quiet -dumpdir a- -dumpbase Hellow world.c -dumpbase-ext .c -mtune=generic -march=nocona -version -o C:\Users\MAX_LA~1\AppData\Local\Temp\ccj2KkKj.s
GNU C17 (Rev3, Built by MSYS2 project) version 13.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 13.2.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/include"
ignoring duplicate directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/include"
ignoring nonexistent directory "D:/a/msys64/ucrt64/include"
ignoring nonexistent directory "/ucrt64/include"
ignoring duplicate directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/include-fixed"
ignoring nonexistent directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "D:/a/msys64/ucrt64/include"
#include "..." search starts here:
#include <...> search starts here:
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/include
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../include
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/include-fixed
End of search list.
Compiler executable checksum: 9ededbb617523f3ae037d5140d325cc4
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a-'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o C:\Users\MAX_LA~1\AppData\Local\Temp\cc0lPVF4.o C:\Users\MAX_LA~1\AppData\Local\Temp\ccj2KkKj.s
GNU assembler version 2.41 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.41
COMPILER_PATH=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/;C:/msys64/ucrt64/bin/../lib/gcc/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/
LIBRARY_PATH=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/;C:/msys64/ucrt64/bin/../lib/gcc/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a.'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/collect2.exe -plugin C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/liblto_plugin.dll -plugin-opt=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\MAX_LA~1\AppData\Local\Temp\ccxEf93U.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lkernel32 -m i386pep -Bdynamic C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/crt2.o C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/crtbegin.o -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0 -LC:/msys64/ucrt64/bin/../lib/gcc -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../.. -lshcore C:\Users\MAX_LA~1\AppData\Local\Temp\cc0lPVF4.o -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/default-manifest.o C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/crtend.o
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\MAX_LA~1\AppData\Local\Temp\cc0lPVF4.o:Hellow world.c:(.text+0x13): undefined reference to `SetProcessDpiAwareness'
collect2.exe: error: ld returned 1 exit status
PS D:\MaxLife\Programming\Learn\C> gcc -v -lshcore "Hellow world.c"
Using built-in specs.
COLLECT_GCC=C:\msys64\ucrt64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.2.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Rev3, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a-'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/cc1.exe -quiet -v -iprefix C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/ -D_REENTRANT Hellow world.c -quiet -dumpdir a- -dumpbase Hellow world.c -dumpbase-ext .c -mtune=generic -march=nocona -version -o C:\Users\MAX_LA~1\AppData\Local\Temp\ccVz6oiA.s
GNU C17 (Rev3, Built by MSYS2 project) version 13.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 13.2.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/include"
ignoring duplicate directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/include"
ignoring nonexistent directory "D:/a/msys64/ucrt64/include"
ignoring nonexistent directory "/ucrt64/include"
ignoring duplicate directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/include-fixed"
ignoring nonexistent directory "C:/msys64/ucrt64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "D:/a/msys64/ucrt64/include"
#include "..." search starts here:
#include <...> search starts here:
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/include
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../include
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/include-fixed
End of search list.
Compiler executable checksum: 9ededbb617523f3ae037d5140d325cc4
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a-'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o C:\Users\MAX_LA~1\AppData\Local\Temp\ccoiHn1E.o C:\Users\MAX_LA~1\AppData\Local\Temp\ccVz6oiA.s
GNU assembler version 2.41 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.41
COMPILER_PATH=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/;C:/msys64/ucrt64/bin/../lib/gcc/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/
LIBRARY_PATH=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/;C:/msys64/ucrt64/bin/../lib/gcc/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/;C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=nocona' '-dumpdir' 'a.'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/collect2.exe -plugin C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/liblto_plugin.dll -plugin-opt=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\MAX_LA~1\AppData\Local\Temp\ccxk9ThP.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lkernel32 -m i386pep -Bdynamic C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/crt2.o C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/crtbegin.o -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0 -LC:/msys64/ucrt64/bin/../lib/gcc -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib -LC:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../.. -lshcore C:\Users\MAX_LA~1\AppData\Local\Temp\ccoiHn1E.o -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/default-manifest.o C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/crtend.o
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\MAX_LA~1\AppData\Local\Temp\ccoiHn1E.o:Hellow world.c:(.text+0x13): undefined reference to `SetProcessDpiAwareness'
collect2.exe: error: ld returned 1 exit status
PS D:\MaxLife\Programming\Learn\C> changed codewill I replaced #include <windows.h>
//#include <shellscalingapi.h>
//#include <WinUser.h>
#include <stdio.h>
//#pragma comment(lib, "user32.lib")
int main() {
// Set the process to be DPI aware
// SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
SetProcessDPIAware();
char name[] = "Max";
MessageBoxA(0, name, "AAA", 1);
ShellMessageBoxA(0, 0, "ssss", "hhh", 0);
printf("%s", name);
return 0;
} |
This is an issue with your VS Code setup, not the compiler.
Because of
|
After updating MSYS2 this morning, I cannot compile my app any more, getting this error:
The text was updated successfully, but these errors were encountered: