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

SDL Warning prevents compiling #70415

Closed
worm-girl opened this issue Dec 24, 2023 · 7 comments · Fixed by #70446
Closed

SDL Warning prevents compiling #70415

worm-girl opened this issue Dec 24, 2023 · 7 comments · Fixed by #70446
Labels
Code: Build Issues regarding different builds and build environments OS: Windows Issues related to Windows operating system (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@worm-girl
Copy link
Contributor

Describe the bug

Attempting to compile the current build of the game results in:


C:/msys64/mingw64/include/SDL2/SDL_main.h:143:17: error: no previous declaration for 'int SDL_main(i
nt, const char**)' [-Werror=missing-declarations]
  143 | #define main    SDL_main
      |                 ^~~~~~~~

#70377 sought to fix it but that solution didn't work. I popped into the discord and didn't really see anybody talking about it, so I'm making an issue in case it needs more eyes on it. If it's already under control then please disregard.

Attach save file

N/A

Steps to reproduce

Clone the repository, try to compile, fail.

Expected behavior

The game ought to compile.

Screenshots

No response

Versions and configuration

If it matters, I'm using MSYS2 and the command I'm trying is $ make CCACHE=0 RELEASE=1 MSYS2=1 DYNAMIC_LINKING=1 SDL=0 TILES=1 SOUND=1 LOCALIZE=1 LANGUAGES=all LINTJSON=0 ASTYLE=0 RUNTESTS=0 -j12

If there's a short-term fix I could do on my end I'd love to hear about it so I can get back to work.

Additional context

No response

@worm-girl worm-girl added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Dec 24, 2023
@ZhilkinSerg
Copy link
Contributor

SDL_MAIN_HANDLED probably needed somewhere

@worm-girl
Copy link
Contributor Author

Is there some other way people are able to compile? I see PRs still going up since this issue began.

@ZhilkinSerg
Copy link
Contributor

@worm-girl
Copy link
Contributor Author

I'm not sure what I'm supposed to make of this link. Is it just MSYS that's having the problem? Is there a way to get it to stop? Is there a specific one that doesn't have the problem?

I asked on the discord but I was told to come here.

@ZhilkinSerg
Copy link
Contributor

I'm not sure what I'm supposed to make of this link.

That link contains all compilation guides for various environments.

Is it just MSYS that's having the problem? Is there a way to get it to stop?

I am not having any issues compiling using current MSYS guide using command line make CCACHE=1 RELEASE=1 MSYS2=1 DYNAMIC_LINKING=1 SDL=1 TILES=1 SOUND=1 LOCALIZE=0 LANGUAGES=all LINTJSON=0 ASTYLE=0 TESTS=0. You are not using TESTS=0 and the issue appears when compiling tests.

@worm-girl
Copy link
Contributor Author

I am not having any issues compiling using current MSYS guide using command line make CCACHE=1 RELEASE=1 MSYS2=1 DYNAMIC_LINKING=1 SDL=1 TILES=1 SOUND=1 LOCALIZE=0 LANGUAGES=all LINTJSON=0 ASTYLE=0 TESTS=0. You are not using TESTS=0 and the issue appears when compiling tests.

This fixed it, thank you for explaining.

@BrettDong BrettDong added (S2 - Confirmed) Bug that's been confirmed to exist Code: Build Issues regarding different builds and build environments and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Dec 25, 2023
@ZhilkinSerg ZhilkinSerg added the OS: Windows Issues related to Windows operating system label Dec 25, 2023
@Qrox Qrox mentioned this issue Dec 26, 2023
@prharvey
Copy link
Contributor

Compiling tests with MSVC now spams a bunch of warnings that SDL_MAIN_HANDLED is duplicated. The tests still run so it's rather low priority, but it's a little noisy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Build Issues regarding different builds and build environments OS: Windows Issues related to Windows operating system (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants