sdl2 codeblocks windows 11 ld.exe cannot find -lSDL2main

hello i have a problem when compiling on codeblocks

im on windows 11 is that the problem ?

What flavour of mingw are you using ?

You can tell them apart with the prefix of the commands:

  • x86_64-w64-mingw32- builds and links x64 binaries
  • i686-w64-mingw32- builds and links x86 binaries

In your last screenshot, I see you’ve added the i686-w64-mingw32 versions to the library search paths. If Codeblocks uses x86_64-w64-mingw32 by default, it will ignore the i686 libraries as they are incompatible and tell you the libraries you requested were not found.

If you specifically want 32 bits applications. Then see if you can switch the architecture in Codeblocks. Otherwise, you want to edit your library search paths to have x86_64-w64-mingw32 instead of i686-w64-mingw32.

yes it works with x86_64-w64-mingw32- library, thank you but how i can do for run the i686-w64-mingw32- version ?