Skip to content
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

'wmain' is only used if 'WIN32' is defined #1849

Closed
glebov-andrey opened this issue Jan 29, 2020 · 1 comment
Closed

'wmain' is only used if 'WIN32' is defined #1849

glebov-andrey opened this issue Jan 29, 2020 · 1 comment
Labels

Comments

@glebov-andrey
Copy link

Hi!
There appears to be a leftover WIN32 macro check after #193 and #1676.

#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
// Standard C/C++ Win32 Unicode wmain entry point
extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {

Because of this one has to resort to manually defining WIN32 (if _WIN32 is defined) before including catch.hpp in main.cpp.
Presumably the correct thing would be to check CATCH_PLATFORM_WINDOWS instead.
As far as I can tell this is the only remaining use of WIN32 in Catch2.

@horenmar
Copy link
Member

horenmar commented Feb 3, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants