-
Notifications
You must be signed in to change notification settings - Fork 489
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
Nearly Everything is Broken #2718
Comments
I can compile your project in my msys2/mingw64 setup. Try this simple way
g++ "filesystem.cpp" "gamemaker.cpp" -o "libfilesystem.dll" -shared -std=c++17 -static-libgcc -static-libstdc++ -static |
As a note, this is MSYS2-packages, so for the msys2 subsystem, not mingw64 etc, so _WIN32, should not be defined for the gcc provided here as the gcc provided here should closer emulate cygwin's gcc, which would compile linux/posix code usually. (the else in a gcc -dM -E - < /dev/null | sort -u | grep -i win
#define __CYGWIN__ 1
#define __SIZEOF_WINT_T__ 4
#define __WINT_MAX__ 0xffffffffU
#define __WINT_MIN__ 0U
#define __WINT_TYPE__ unsigned int
#define __WINT_WIDTH__ 32
and gcc -dM -E - < /dev/null | sort -u | grep -i nix
#define __unix 1
#define __unix__ 1
#define unix 1 If you have an issue with one of the mingw-w64 or clang (non-msys2) compilers, you probably are looking for https://github.com/msys2/MINGW-packages |
You know that MSYS2 and MSYS2/MINGW are rolling-based platforms. They have the latest release of every package. So don't expect any stability here. If something go wrong investigate it and see if the issue is from MSYS2/MINGW side or is it from the upstream side, If the former then contributors will try to fix it, if the later then you should report it to the upstream and then if there is a quick fix it can be backported here. |
the odd thing though, is up until now, _WIN32 was defined along with all the functions I mentioned, I'm not doing anything different from what i usually do with this. I didn't know MINGW and MSYS2 had different compilers. However, regardless of whether I run it from a MSYS2 or MINGW terminal, the result is the same errors.
I tried that and on my end I'm still getting the same errors. I don't know what information I haven't shared already. All I did was install fresh msys2 to C:\msys2 and ran pacman -Syu to update then I installed gcc with pacman -Sy gcc. After that, I ran the build script. Are you not able to reproduce this issue following the exact steps I mentioned here? Has anything changed with MSYS2 and its packages that would cause this to happen? Like, a change in expected behavior that wasn't announced on the home page? |
Would you like to provide the actual output in your setup? If the error output is too long you can attach a text file here with that log. |
You mean the errors I'm getting with the filesystem example project i provided or something else? |
Yes, the errors you get while compiling the project. |
We have upgraded MSYS2/gcc recently from 10.2.0 to 11.2.0, Maybe this is the reason! |
I'll provide the version of the errors where I manually define -D_WIN32 hoping that will have more relevant output
In case you wanted to know what happens when I don't manually define -D_WiN32:
|
if that is the case, it would be refreshing to know i'm not just plain stupid and doing something wrong but rather other people are having the same issues. Then again, I hope it was me doing something wrong. I don't want that many people effected by this. |
I assume that the build step is using msys2 g++ instead of mingw g++. Did you install
|
Is this a new requirement? I don't remember ever needing to do this in the past, but it definitely is installing new packages so right now I'm 90% sure this is the fix. Thank you so very much!!! I feel so stupid. I'll close this after I've confirmed it. |
hands down, sorry guys for the dumb excuse of a bug report, you are my hero |
The required steps are documented here https://www.msys2.org/. If you think the documentation need more clarification please let us know. As you are using mingw environment, will it be appropriate to move this issue to MINGW-packages repository? |
Seeing as the issue was me and not the software, it really doesn't belong anywhere. But I'll know for the future where to report bugs to more precisely if encounter a real one at some point. |
Describe the issue
Literally none of my my projects build anymore after recent update. Apparently _WIN32 is no longer defined along with a crap ton of other functions that used to work now are undefined references -- mainly windows-specific posix-like functions such as wcsncpy_s and _wfopen_s, _close, _read, _write, etc. literally all of the posix functions with an underscore prefix no longer compile - with zero changes to my code made. This has been confirmed on two different of my machines.
Steps to Reproduce the Problem
Tried on Windows 11 and Windows 10
The text was updated successfully, but these errors were encountered: