0

To install SDL2 with codeblocks , i recieve when i compile the error : "undefined reference to winmain " I added -L mingw32 -L SDL2 -L SDL2main -mwindows

but still the same problem anyone can help me please ?

wissal
  • 1
  • 2
    Does this answer your question? [How do I use SDL2 in my programs correctly?](https://stackoverflow.com/questions/64396979/how-do-i-use-sdl2-in-my-programs-correctly) – HolyBlackCat Jan 05 '22 at 11:30
  • 1
    In particular, you need `-lmingw32 -lSDL2main -lSDL2` (in this order, with lowercase L's). `-mwindows` is unrelated, it just hides the terminal window. – HolyBlackCat Jan 05 '22 at 11:31

0 Answers0