winapifamily.h : No such file or directory
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.
Jeremy Beare
Updated on August 02, 2022Comments
-
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 about 10 yearsI tried that .h file and it doesn't fix the problem
-
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 about 10 yearsI think it very troubling as well. Would the older version be on the website?
-
Jeremy Beare about 10 yearsI can't find any old versions on their website. That is even more troubling
-
Leonardo about 10 yearsI don't see anything, sorry. I do think I have the old 2.0.0 for MinGW.
-
Jeremy Beare about 10 yearsThat may work. I hope it does. If it doesn't, what else can be done?
-
Leonardo about 10 yearsWell there are many things. But, if you want my honest opinion use a wrapper for SDL such as
http://www.pygame.org
-
Jeremy Beare about 10 yearsWould you suggest using a different software? Perhaps Visual Studio?
-
Leonardo about 10 years2.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 about 10 yearsMy 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 about 10 yearsI 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 about 10 yearsProblem is with Code Blocks it just won't play with SDL. Did you manage to get it working with VS?
-
Leonardo about 10 yearsYeah 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 about 10 yearsI 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 about 10 yearsI thought you said you were using lazyfoo.
http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/index.php
-
Jeremy Beare about 10 yearsDidn'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 about 10 yearsI'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 over 9 yearsthis seems to be the root cause of this failure