-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
MinGW: CATCH_CONFIG_MAIN
defines the non-standard WinMain
instead of the standard main
function
#2437
Comments
There is an explicit code that results in this issue. I don't know why just Catch2 doesn't use main on Windows similar to others! Catch2/include/internal/catch_default_main.hpp Lines 16 to 18 in e33de8f
|
I am pretty sure you are wrong here. This linking error:
means that From a quick google, the issue is that you need to add |
Adding -municode doesn't fix undefined references to `WinMain' Why do you want to use non-standard wmain on Windows? |
As to your question, |
If you want to keep this Unicode default on MinGW, you should handle |
Adding https://github.com/aminya/project_options/runs/6819912259?check_suite_focus=true#step:5:458
|
Mingw doesn't use https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/#unicode-applications Current MinGW status:
This can be simply fixed by using the standard main function! |
@horenmar any update on my comments and pull request? |
My build worked using v.3.1.0 but gives undefined reference to WinMain at v.3.2.0. Turns out in cmake I needed to link with |
For anyone who is still struggling with this, as a last resort you can provide your own |
|
Describe the bug
Once you define the
CATCH_CONFIG_MAIN
definition on MinGW, it defines a non-standard main function called WinMain. This results in a lot of undefined references. This doesn't happen with other compilers.https://github.com/aminya/cpp_vcpkg_project/runs/6542106054?check_suite_focus=true#step:6:203
Expected behavior
CATCH_CONFIG_MAIN
should define a standard main on MinGWReproduction steps
task test
ormake test
Platform information:
Additional context
Blocks aminya/project_options#129
Related issues:
The text was updated successfully, but these errors were encountered: