Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Akashi   Members   -  Reputation: 268

Like
0Likes
Like

Posted 28 May 2012 - 04:46 PM

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...

Sponsor:

#2 frob   Moderators   -  Reputation: 22692

Like
0Likes
Like

Posted 28 May 2012 - 06:45 PM

What is your exact error message?

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#3 Akashi   Members   -  Reputation: 268

Like
0Likes
Like

Posted 28 May 2012 - 08:38 PM

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?

#4 Deranged   Members   -  Reputation: 606

Like
1Likes
Like

Posted 28 May 2012 - 09:33 PM

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.
Regards,
Sheridan Bulger
-Day Job | Software Developer | Deacom, Inc.
-Moonlighting | President (lead) | Nonpareil Studios, LLC.

#5 jamby   Members   -  Reputation: 147

Like
0Likes
Like

Posted 28 May 2012 - 10:19 PM

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.

#6 Aardvajk   Crossbones+   -  Reputation: 6181

Like
0Likes
Like

Posted 29 May 2012 - 04:31 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS