Jump to content
  • Advertisement
Sign in to follow this  
StoneMask

Cannot open source file 'time.h', 'stdio.h'

This topic is 2246 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just what the title says. Likewise, I cannot include Windows.h or use its data types.

- I am using Microsoft Visual Studios 2010 in combination with DirectX9.
- I have added the Lib/Include files to my Include directory, the x86 folder to my Lib directory, and the DxErr folder to my Source directory across all configurations
- I do not have "Ignore Standard Include Paths" ticked across all configurations
- My SDK is from June 2010.
- I have included the following in my Linker Input across all configurations

  • d3d9.lib
  • d3dx9.lib
  • DxErr.lib
  • dxguid.lib
  • dsound.lib
  • winmm.lib
  • dinput8.lib

    - I am manipulating a Win32 project that started empty.
    - None of my other DirectX programs are giving me this problem

    Instead of using completely original files, I attempted to use existing source and header files from my other projects. Would that cause something like this? It doesn't seem very likely...

Share this post


Link to post
Share on other sites
Advertisement
Well, I haven't put together all the sources files together in a way that fits yet. It's that when I mouse over the preprocessor directives, there's a red line underneath and it says what it says in the title: Cannot open source file 'time.h', Cannot open source file 'stdio.h' etc. Those are pretty standard things, right? Like, I wouldn't be able to miss those if I tried?

Share this post


Link to post
Share on other sites
Are the standard library folders in the include directories in the project settings? Also, if you're using C++ give cstdio and ctime a try instead.

Share this post


Link to post
Share on other sites

Well, I haven't put together all the sources files together in a way that fits yet. It's that when I mouse over the preprocessor directives, there's a red line underneath and it says what it says in the title: Cannot open source file 'time.h', Cannot open source file 'stdio.h' etc. Those are pretty standard things, right? Like, I wouldn't be able to miss those if I tried?


If by this you mean you haven't actually compiled anything yet, well...do so. I've had red squiggly lines many times that were totally bogus; there was nothing wrong.

Share this post


Link to post
Share on other sites

Well, I haven't put together all the sources files together in a way that fits yet. It's that when I mouse over the preprocessor directives, there's a red line underneath and it says what it says in the title: Cannot open source file 'time.h', Cannot open source file 'stdio.h' etc. Those are pretty standard things, right? Like, I wouldn't be able to miss those if I tried?


Add a .cpp to your project. Put in #include <time.h>. Select the 'Compile Unit' option to compile this file in isolation. If this compiles, its what jamby says. I've never seen false-positive squigglies on #includes though personally, so I suspect it isn't. Nice to know though.

Debugging your environment setup before you can actually compile anything is not my idea of a great day.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!