0

I'm trying to get SDL working using g++ on Windows 10, and I'm getting an error which states that stdint.h could not be found.

g++ -g -Wall -I includes/SDLm/x86_64-w64-mingw32/include main.cpp -o main

In file included from includes\SDLm\x86_64-w64-mingw32\include\SDL2/SDL_main.h:25,
             from includes\SDLm\x86_64-w64-mingw32\include\SDL2/SDL.h:32,
             from Window.h:1,
             from main.cpp:2:
includes\SDLm\x86_64-w64-mingw32\include\SDL2/SDL_stdinc.h:71: stdint.h: No such file or directory

I'm not sure what I need to do to fix this, so any help would be greatly appreciated, thank you!

  • 1
    Yep. This is an issue with MINGW, if you have MSVC > 9.0. The solution is to write the file yourself, as suggested [here](https://github.com/sgan81/apfs-fuse/issues/5#issuecomment-361565752) – mutantkeyboard Jun 18 '18 at 13:15
  • 1
    What version of GCC are you using? – Candy Gumdrop Jun 18 '18 at 13:31
  • @CandyGumdrop egcs-2.91.57 – Greg Salvesen Jun 18 '18 at 13:51
  • @GregSalvesen Why on earth are you trying to use a 20-year-old compiler instead of a current one? –  Jun 18 '18 at 13:54
  • @GregSalvesen that version of the toolchain predates the adoption of the ISO standard C++ language. Don't be surprised that it doesn't work in anything resembling an expected way. – Stephen M. Webb Jun 18 '18 at 14:23
  • @hvd @StephenM.Webb Oh, I didn't realize I was using such an old version. I updated to `gcc (MinGW.org GCC-6.3.0-1) 6.3.0`, and I no longer got the error about stdint.h, however now I'm getting the error `g++: error: CreateProcess: No such file or directory` – Greg Salvesen Jun 18 '18 at 14:26
  • @GregSalvesen If you're getting a `no such file or directory` error, I'd double-check your `include` lines in your headers an implementation files, as well as your main. – Jonathan Jun 18 '18 at 15:06

0 Answers0