-
Notifications
You must be signed in to change notification settings - Fork 25
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
Linker error when building with MinGW 11.2 #44
Comments
And does it compile on mingw? I'm only using msys2. |
Doesn't compile I'm getting compile errors, this is the first time I tried to compile with mingw-w64. |
Yes, It compiles with MinGW and if I remove the line -fuse-ld=lld it also links properly. If I build the debug version I need to completely disable this part: target_link_options(${target} INTERFACE
$<$<CONFIG:Debug,RelWithDebInfo>:
LINKER:--dynamicbase,--high-entropy-va,--nxcompat
LINKER:--default-image-base-high>
# Use faster linker ( GNU ld linker doesn't work with the Clang;
# for both GCC and Clang )
# TODO use LINKER_TYPE target property when min. version will be CMake v3.29 silverqx
# -fuse-ld=lld
) to link the library. I use the MinGW distribution that is installed with the Qt installer for Qt 5.15.2. So the only problem for me is the link step. |
I tried now mingw 11.2 with Qt 6.7.1 and I have 2 more problems, it doesn't recognize Now I also tried MinGW 13.1 and it works with this pragma but still doesn't recognize |
Yes, this happens if you build with debug info - to workaround this, I simply disable / remove the following part: target_link_options(${target} INTERFACE
$<$<CONFIG:Debug,RelWithDebInfo>:
LINKER:--dynamicbase,--high-entropy-va,--nxcompat
LINKER:--default-image-base-high>
# Use faster linker ( GNU ld linker doesn't work with the Clang;
# for both GCC and Clang )
# TODO use LINKER_TYPE target property when min. version will be CMake v3.29 silverqx
# -fuse-ld=lld
) |
mingw64 13.1 has outdated ld.exe v2.40, the |
I have found ~7 problems:
I really recommend installing MSYS2 ucrt64, mingw-w64 is only outdated msys2 that is missing many fixes. I look at this when I will have a more time but msys2 ucrt64 g++, clang++ builds are tested using CI pipelines with all possible cmake option combinations, static/shared/tinydrivers/g++/clang++ builds, ... here and here. |
But it compiles with 0 warnings and errors, which is impressive for an unsupported or untested platform 😁 Problem is that it takes 30min to compile, msvc or clang got it in 3mins (I'm talking about unit tests, compiling core dll and tom.exe is pretty fast). |
Ok, thank you for the quick response. I just had quick look into the documentation and the supported compilers. I missed the part that MinGW is an unsupported platform - sorry. |
Nothing to sorry, still lot of bugs in my code 😂, I leave it open so it can be fixed, sometimes, I should at least fix eg. |
I have removed that hard-coded |
When I build TinyORM with MinGW 11.2 i get the following linker error:
I can fix this error by removing or commenting line 160 in
TinyCommon.cmake
: -fuse-ld=lld. The lld linker is not included in a normal MinGW distribution.The text was updated successfully, but these errors were encountered: