winapifamily.h : No such file or directory

16,581

How about hardcoding the include directory to your project? winapifamily.h should be on C:\Program Files (x86)\Windows Kits\8.0\Include\shared. You can add it to the "search directories" tab in project build options.

Make sure to check the file exist in the location first. If it doesn't, you may need to install windows 8 sdk.

Share:
16,581
Jeremy Beare
Author by

Jeremy Beare

Updated on August 02, 2022

Comments

  • Jeremy Beare
    Jeremy Beare almost 2 years

    After a previous issue, I gave up and blew my installation away to start afresh. Reinstalling MinGW, Code Blocks (with MinGW) and SDL. Following this tutorial (http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/index.php) to the letter. And every time I try to compile, no matter if the project is new or not, will suffer from the error message in the topic title.

    I have tried this solution ("winapifamily.h: No such file or directory" when compiling SDL in Code::Blocks) and it still prevails. I have blown the installation to start again. I have now run out of options. Can anyone tell me why this is still happening?

    I am using the latest versions of MinGW, SDL and Code Blocks.

  • Jeremy Beare
    Jeremy Beare about 10 years
    I tried that .h file and it doesn't fix the problem
  • Leonardo
    Leonardo about 10 years
    @JeremyBeare This is troubling news. I would download an older version such as 2.0.0. It will work as well as 2.0.3 for the tutorials.
  • Jeremy Beare
    Jeremy Beare about 10 years
    I think it very troubling as well. Would the older version be on the website?
  • Jeremy Beare
    Jeremy Beare about 10 years
    I can't find any old versions on their website. That is even more troubling
  • Leonardo
    Leonardo about 10 years
    I don't see anything, sorry. I do think I have the old 2.0.0 for MinGW.
  • Jeremy Beare
    Jeremy Beare about 10 years
    That may work. I hope it does. If it doesn't, what else can be done?
  • Leonardo
    Leonardo about 10 years
    Well there are many things. But, if you want my honest opinion use a wrapper for SDL such as http://www.pygame.org
  • Jeremy Beare
    Jeremy Beare about 10 years
    Would you suggest using a different software? Perhaps Visual Studio?
  • Leonardo
    Leonardo about 10 years
    2.0.3 works for my Visual Studio setup, it just depends how determined you are and what your goals are. I would say yes try it so you know what you like.
  • Jeremy Beare
    Jeremy Beare about 10 years
    My goal is to relearn C++ fully and get back into using it to build 2D Games. I lost that skill a long time ago and I want it back. But I have spent the last 3 days trying to set up a C++ & 2D config and it just won't work. Do you typically use VS?
  • Leonardo
    Leonardo about 10 years
    I find myself using CodeBlocks most of the time. Visual Studio feels like overkill. I just go with whatever is easiest to get pictures and colors in a window on my screen.
  • Jeremy Beare
    Jeremy Beare about 10 years
    Problem is with Code Blocks it just won't play with SDL. Did you manage to get it working with VS?
  • Leonardo
    Leonardo about 10 years
    Yeah it works fine. But did you still get the same error message even after including those directories? It could just be a small thing you need to do. I once spent weeks off and on trying to get Ogre3D to work not realizing the finer details of what I was doing..
  • Jeremy Beare
    Jeremy Beare about 10 years
    I did get those same errors with Code Blocks. That's why I just rebooted Visual Studio. Could I ask what needs to be done to get SDL and Visual Studio playing happy families? I can't find a tutorial on the net
  • Leonardo
    Leonardo about 10 years
    I thought you said you were using lazyfoo. http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/index.‌​php
  • Jeremy Beare
    Jeremy Beare about 10 years
    Didn't notice there was a Visual Studio one :P Anyway I have no got a lot of errors. But they come in these varieties unresolved external symbol _main referenced in function ___tmainCRTStartup unresolved external symbol _SDL_Quit referenced in function _SDL_main What on earth is this all about?
  • Jeremy Beare
    Jeremy Beare about 10 years
    I've managed to get by that error but into another. http://www.cplusplus.com/forum/beginner/89554/. I need to find a 32-Bit version of the SDL2.dll. Any ideas?
  • paulm
    paulm over 9 years
    this seems to be the root cause of this failure