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

Unable to build application if "UNICODE" macro is defined #7010

Closed
cmhxone opened this issue Jan 7, 2023 · 1 comment
Closed

Unable to build application if "UNICODE" macro is defined #7010

cmhxone opened this issue Jan 7, 2023 · 1 comment

Comments

@cmhxone
Copy link

cmhxone commented Jan 7, 2023

If "UNICODE" macro is defined, compiler unabled to find argv identifier.

My short-sighted opinion is rename wargv argument to argv...

image

#if defined( UNICODE ) && UNICODE
int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
#else /* ANSI */
int main(int argc, char *argv[])
#endif
{
(void)argc;
(void)argv;
return SDL_RunApp(0, NULL, SDL_main, NULL);
}

@madebr
Copy link
Contributor

madebr commented Jan 7, 2023

It'll also need:

#if defined(UNICODE) && UNICODE
    (void)wenvp;
#endif

to avoid a warning about a unused wenvp.

@slouken slouken closed this as completed in 7f08013 Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants